Martin Gregorie wrote:
> On Tue, 29 Sep 2020 20:34:06 +0000, bob prohaska wrote:
>
>> Dennis Lee Bieber wrote:
>>> On Tue, 29 Sep 2020 00:27:34 -0000 (UTC), bob prohaska
>>>
>>> declaimed the following:
>>>
>>>
>>>>bob@raspberrypi:~/brlcad-code/build $ mged BRL-CAD Release 7.32.1
>>>>Geometry Editor (MGED)
>>>> Mon, 28 Sep 2020 16:16:25 -0700, Compilation 2 bob@raspberrypi
>>>>
>>>>ERROR: alloc size=0 (cnt=0, sz=4) dm name array
>>>>
>>>>ERROR: bu_malloc(0)
>>>>
>>>>ERROR: bu_malloc(0)
>>>>
>>>>Saving stack trace to mged-5459-bomb.log
>>>>
>>>>
>>> That looks like some significant code error... Attempt to
>>> allocate a
>>> chunk of memory of SIZE 0!
>>>
>>> It might be worth studying that log to see if you can determine
>>> where
>>> in the code this call occurs, and from there track down whatever
>>> computation is being used to determine the size to be allocated. (Note:
>>> that error message actually comes from a level below bu_malloc -- both
>>> bu_malloc and bu_calloc use the same alloc() function, with a parameter
>>> identifying which m/c mode to run in --
>>> https://brlcad.org/docs/doxygen-r64112/d6/dcd/malloc_8c_source.xhtml ).
>>>
>>>
>>>
>> I've put the backtrace at
>> http://www.zefox.net/~fbsd/rpi4/mged-9973-bomb.log if anybody wants to
>> take a look.
>>
>> The only things I can recgonize as errors in the logfile are a couple of
>> "permission denied" errors apparently caused by the backtrace generation
>> process. I don't think that's relevant, but perhaps I should point out
>> that the build and run were done as a regular user, with only the
>> install using root credentials.
>>
>> There's already a support request in to the brlcad project, to which
>> I've added my $.02 so hopefully somebody will take note. Someday.....
>>
> Its easy enough to see where malloc is called with a zero pointer,
> evidently because calloc, which called it wants zero 4 byte items, but I
> lose it at that point thanks to so much stuff being
>
> So all I'd suggest are: can you turn off crash dump optimisation and is
> it possible this is connected with a screwed up configuration file? There
> seem to be a lot of zero values in what looks like system parameters.
>
> HTH
>
>
Couldn't find any obvious hints for turning off crash dump optimization.
I did try starting gdb and running mged manually:
(gdb) file mged
Reading symbols from mged...done.
(gdb) run
Starting program: /usr/local/bin/mged mged
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
BRL-CAD Release 7.32.1 Geometry Editor (MGED)
Mon, 28 Sep 2020 17:06:52 -0700, Compilation 3
bob@raspberrypi
Create new database (y|n)[n]? y
ERROR: alloc size=0 (cnt=0, sz=4) dm name array
ERROR: bu_malloc(0)
ERROR: bu_malloc(0)
Saving stack trace to mged-20404-bomb.log
[Detaching after fork from child process 20407]
Program received signal SIGINT, Interrupt.
0xb4589664 in __GI___select (nfds=0, readfds=0x0, writefds=0x0, exceptfds=0x0,
timeout=0xbeffeeb8)
at ../sysdeps/unix/sysv/linux/select.c:41
41 ../sysdeps/unix/sysv/linux/select.c: No such file or directory.
(gdb) bu_semaphore_free(): pthread_mutex_destroy() failed on [6] of [12]
(gdb) bt
#0 0xb4589664 in __GI___select (nfds=0, readfds=0x0, writefds=0x0,
exceptfds=0x0, timeout=0xbeffeeb8)
at ../sysdeps/unix/sysv/linux/select.c:41
#1 0xb4686da8 in bu_snooze (useconds=) at
/home/bob/brlcad-code/src/libbu/snooze.c:45
#2 0xb46c6a78 in bu_backtrace (fp=0x3a80f0) at
/home/bob/brlcad-code/src/libbu/backtrace.c:502
#3 0xb46c7b20 in bu_crashreport (
filename=filename@entry=0xb5e1a474 "mged-20404-bomb.log")
at /home/bob/brlcad-code/src/libbu/crashreport.c:101
#4 0xb46c80cc in bu_bomb (str=) at
/home/bob/brlcad-code/src/libbu/bomb.c:180
#5 0xb46bdfd8 in alloc (str=0xacbec "dm name array", sz=4, cnt=0, type=CALLOC)
at /home/bob/brlcad-code/src/libbu/malloc.c:108
#6 bu_calloc (nelem=0, elsize=4, str=) at
/home/bob/brlcad-code/src/libbu/malloc.c:174
#7 0x0001cf74 in get_attached () at
/home/bob/brlcad-code/src/mged/attach.c:507
#8 main (argc=1, argv=0xbefff3e8) at
/home/bob/brlcad-code/src/mged/mged.c:1554
(gdb)
It's not even Greek to me, if it makes sense to somebody else any hints
appreciated!
Thanks for reading,
bob prohaska
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|