[BRLTTY] Crasher/memleak on OpenSolaris

Willie Walker William.Walker at Sun.COM
Wed Aug 19 17:51:22 EDT 2009


Dave Mielke wrote:
> [quoted lines by Willie Walker on 2009/08/19 at 12:32 -0400]
> 
>> Without another braille display, I'm not sure how to use another driver 
>> other than the X Windows driver.  I just tried the X Windows driver and 
>> also notice the stack size increasing at about the same rate (~0.5Mb/min).
> 
> A steadily increasing stack size would, to me, indicate one of two things. The 
> first is continual recursion, but that doesn't seem to be the case as your 
> output from where was reasonable. The second is a compiler optimizer problem, 
> which wouldn't be a code bug. Does your where output show a particular stack 
> frame which is ridiculously huge?

I'm not seeing a long stack that would indicate recursion is happening. 
  In addition, I've compiled with CFLAGS=-g, which I think should get 
rid of optimization issues (I hope).

Here's the stack with symbols at the time things failed:

(dbx) where
current thread: t at 1
   [1] tdb_mutex_stats(0x80b6b58, 0x0, 0x0, 0xfee84a5d), at 0xfee87bef
   [2] mutex_lock_internal(0x80b6b58, 0x0, 0x1, 0xfee8502f), at 0xfee84ab8
   [3] mutex_lock_impl(0x80b6b58, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfee851ba
   [4] mutex_lock(0x80b6b58, 0xfec71000, 0x7648104, 0xfec58937), at 
0xfee85258
   [5] YieldAppLock(0x80bde70, 0x764814e, 0x764814f, 0x7648150), at 
0xfec58944
   [6] _XtWaitForSomething(0x80bde70, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 
0x0), at 0xfec3a5cb
   [7] XtAppPending(0x80bde70, 0x0), at 0xfec3c35f
=>[8] brl_readCommand(brl = 0x80b65e8, context = BRL_CTX_DEFAULT), line 
663 in "braille.c"
   [9] api_readCommand(brl = 0x80b65e8, context = BRL_CTX_DEFAULT), line 
2435 in "brlapi_server.c"
   [10] readBrailleCommand(brl = 0x80b65e8, context = BRL_CTX_DEFAULT), 
line 402 in "brl.c"
   [11] runProgram(), line 1406 in "brltty.c"
   [12] main(argc = 8, argv = 0x80479fc), line 3105 in "brltty.c"

However, when I attempt to use run time memory leak checking in the 
debugger, I see the following and brltty quits:

(dbx) check -leaks
leaks checking - ON
RTC: Enabling Error Checking...
dbx: warning: loop detected in stack
dbx: no such frame '6'

Here's what I'm doing to enable the run time checking (I might be doing 
it wrong).  In one shell, run brltty:

LD_AUDIT=/opt/SunStudioExpress/lib/rtcaudit.so brltty -bxw -xno -p none 
-A auth=none -n

In another shell, I run dbx and attach to the process:

(dbx) dbxenv mt_sync_tracking off
(dbx) attach 20897
Reading brltty
Reading ld.so.1
Reading librt.so.1
Reading libaio.so.1
Reading libintl.so.1
Reading libnsl.so.1
Reading libsocket.so.1
Reading libc.so.1
Reading en_US.UTF-8.so.3
Reading methods_unicode.so.3
Reading libbrlttybxw.so
Reading libXaw7.so.7
Reading libXt.so.4
Reading libX11.so.4
Reading libSM.so.6
Reading libICE.so.6
Reading libXext.so.0
Reading libXmu.so.4
Reading libm.so.2
Reading libXmuu.so.1
Reading libXpm.so.4
Reading libXau.so.6
Reading libscf.so.1
Reading libuutil.so.1
Reading libgen.so.1
Reading libmd.so.1
Reading libmp.so.2
Reading xlcUTF8Load.so.2
Reading libXcursor.so.1
Reading libXrender.so.1
Reading libXfixes.so.1
Reading xomGeneric.so.2
Reading UTF-8%UCS-4LE.so
Reading UCS-4LE%UTF-8.so
Reading rtcaudit.so
Reading libmapmalloc.so.1
Reading libdl.so.1
Reading rtcboot.so
Reading librtc.so
Attached to process 20897 with 2 LWPs
t at 1 (l at 1) stopped in __pollsys at 0xfe771d15
0xfe771d15: __pollsys+0x0015:	jb       __cerror	[ 0xfe6de0d0, .-0x93c45 ]
Current function is awaitOperation
   264     int result = poll(monitors, count, timeout);
(dbx) where
current thread: t at 1
   [1] __pollsys(0x0, 0x0, 0x7f8a924, 0x0), at 0xfe771d15
   [2] _pollsys(0x0, 0x0, 0x7f8a924, 0x0, 0x7f8a948, 0xfeaa3b2b, 0x0, 
0x2625a00, 0xfead6d50, 0xfeaa3af9, 0x0), at 0xfe75e7a8
   [3] poll(0x0, 0x0, 0x28), at 0xfe717834
   [4] local_poll(0x0, 0x0, 0x0, 0x0, 0x28, 0x0), at 0xfeabe96b
   [5] poll(0x0, 0x0, 0x28), at 0xfeab8a38
=>[6] awaitOperation(monitors = (nil), count = 0, timeout = 40), line 
264 in "async.c"
   [7] asyncWait(duration = 40), line 870 in "async.c"
   [8] drainBrailleOutput(brl = 0x80b65e8, minimumDelay = 40), line 129 
in "brl.c"
   [9] runProgram(), line 2862 in "brltty.c"
   [10] main(argc = 8, argv = 0x8047d88), line 3105 in "brltty.c"
(dbx) check -leaks
leaks checking - ON
RTC: Enabling Error Checking...
dbx: warning: loop detected in stack
dbx: no such frame '6'
dbx: internal warning: librtc initialization failed
dbx: librtc.so and dbx version mismatch; Error checking disabled
	Check your installation of librtc.so.
dbx: Error checking initialization failed.  All error checking disabled.

Would a third option be perhaps there's not a free paired up with a 
malloc somewhere? I realize we're using the word 'stack' here, but I 
wonder if pmap's output might be misleading.

Will


More information about the BRLTTY mailing list