[torquedev] OS X outstanding issues

Glen Beane glen.beane at gmail.com
Wed Jan 14 19:45:49 MST 2009

On Wed, Jan 14, 2009 at 9:01 PM, Garrick Staples <garrick at usc.edu> wrote:
> On Wed, Jan 14, 2009 at 07:50:48PM -0500, Glen Beane alleged:
>> On Tue, Jan 13, 2009 at 8:14 PM, Garrick Staples <garrick at usc.edu> wrote:
>> > Glen and I went back and forth on this one. I was having a hard time
>> > duplicating the problem and found that it seemed to depend on various values of
>> > $LANG.  Then I found that using a pointer instead of an array for the first
>> > argument of wordexp() doesn't trigger the problem.
>> >
>> > Whatever is going on inside of wordexp() (or the compiler) depends on how
>> > the first arg is aligned.  Turns out, the compiler is aligning arrays
>> > differently than pointers.
>> >
>> > It will be a fairly small patch to convert our usage of arrays to pointers and
>> > this won't be a problem any more.  I sent a first pass to Glen.
>> Unfortunately the problem is still occurring, but it doesn't happen as
>> regularly.
> Maybe we fixed that instance of the problem and it is now manifesting itself elsewhere.

No we didn't,  it is still in req_cpyfile. See the following
backtrace.  I'm pretty sure the problem is in wordexp/wordfree, the
change just changed the frequency that it is triggered.

I applied your patch to trunk, but the line numbers will be off by one
from yours since I added a sleep() after the

/* child */

 /* now running as user in the user's home directory */

comment lines so that I would have a chance to attach to the child
with gdb before it exits

Breakpoint 1, 0x917594a9 in malloc_error_break ()
(gdb) bt
#0  0x917594a9 in malloc_error_break ()
#1  0x91754497 in szone_error ()
#2  0x9167e463 in szone_free ()
#3  0x9167e2cd in free ()
#4  0x9170da0f in wordfree ()
#5  0x000206dc in req_cpyfile (preq=0x809e00) at requests.c:3441
#6  0x000303f7 in process_request (sfds=9) at ../server/process_request.c:644
#7  0x000a0065 in wait_request (waittime=0, SState=0x0) at
#8  0x00017ad2 in main_loop () at mom_main.c:7831
#9  0x00017f05 in main (argc=1, argv=0xbffffc88) at mom_main.c:7932

More information about the torquedev mailing list