Bug Tracker – Bug 796

Freeze while writing console message to stdout

Last modified: 2012-03-12 06:54:57 UTC
Bug 796 - Freeze while writing console message to stdout
Summary: Freeze while writing console message to stdout
Status: NEW
Alias: None
Product: Odamex
Classification: Unclassified
Component: Client (show other bugs)
Version: (old) 0.6-dev
Hardware: All Linux
: P1 normal
Assignee: Odamex Bug Reporter
Depends on:
Reported: 2012-03-12 03:44 UTC by Dr. Sean
Modified: 2012-03-12 06:54 UTC (History)
1 user (show)

See Also:


Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Sean 2012-03-12 03:44:08 UTC
Lately I've been experiencing freezes with the Odamex client.  GDB indicates that it happens when flushing the stdout buffer (client/src/c_console.cpp, line 458 as of r2808).  This may be a problem localized to a particular combination of libraries on my system or it may be more widespread.  I've included a GDB backtrace of the freeze using 0.6-dev r2808.

So far every time I've examined this freeze in the debugger, the freeze has occurred with a call to CL_Printf() to print an obituary.  I think it is too soon to say that it is exclusive to obituaries or even messages from the server.

====== backtrace begin =======
#0  0x00007f03da389f9d in write () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f03da325273 in _IO_new_file_write (f=0x7f03da6408e0, data=<value optimized out>, n=60) at fileops.c:1276
#2  0x00007f03da324eba in new_do_write (fp=0x7f03da6408e0, 
    data=0x7f03db834000 "[PMCD]PERRONDON was splattered by Dr. Sean's super shotgun.\nun.\nn.\n\n\nntact Ralphis, MiX-MaN, or HeX9109 for assistance!\n", to_do=60) at fileops.c:530
#3  0x00007f03da326425 in _IO_new_do_write (fp=<value optimized out>, data=<value optimized out>, to_do=60) at fileops.c:503
#4  0x00007f03da3257d8 in _IO_new_file_sync (fp=0x7f03da6408e0) at fileops.c:905
#5  0x00007f03da31a23b in _IO_fflush (fp=0x7f03da6408e0) at iofflush.c:43
#6  0x000000000040d331 in PrintString (printlevel=1, outline=0x7fffaada8710 "[PMCD]PERRONDON was splattered by Dr. Sean's super shotgun.\n") at client/src/c_console.cpp:458
#7  0x000000000040d906 in VPrintf(int, const char *, typedef __va_list_tag __va_list_tag *) (printlevel=1, format=0x51bc81 "%s", parms=0x7fffaadaa740) at client/src/c_console.cpp:610
#8  0x000000000040d9ce in Printf (printlevel=1, format=0x51bc81 "%s") at client/src/c_console.cpp:619
#9  0x000000000041e8ba in CL_Print () at client/src/cl_main.cpp:1383
#10 0x0000000000421dbd in CL_ParseCommands () at client/src/cl_main.cpp:2792
#11 0x000000000043e13f in G_Ticker () at client/src/g_game.cpp:942
#12 0x00000000004390b8 in TryStepTics (tics=0) at client/src/d_net.cpp:120
#13 0x0000000000439254 in TryRunTics () at client/src/d_net.cpp:157
#14 0x0000000000433070 in D_DoomLoop () at client/src/d_main.cpp:448
#15 0x00000000004373fa in D_DoomMain () at client/src/d_main.cpp:1724
#16 0x000000000048a0f2 in main (argc=5, argv=0x7fffaadb7cf8) at client/src/../sdl/i_main.cpp:215
====== backtrace end =======
Comment 1 Russell Rice 2012-03-12 06:54:57 UTC
Not sure if its anything, but the string in frame #2 of the backtrace looks interesting