[netflow-tools] Python flowd module causing SIGBUS on OpenBSD/sparc64

Ben Lovett ben at tilderoot.com
Fri Sep 7 14:29:46 EST 2007


On Sep 3, 2007, at 3:49 AM, Damien Miller wrote:
> It looks like something is hosing memory, but the crash doesn't seem
> to be proximal to the actual corruption. Turning on those malloc  
> options
> might expose the corruption closer to where it occurs.

Rebuilt python with debugging symbols for good measure.

It doesn't make much sense to me that it would be crashing in a  
return.. But I suppose that is just another indication that something  
is going terribly wrong.

selenium:~ % env MALLOC_OPTIONS=AFGJP python2.4
Python 2.4.4 (#1, Sep  3 2007, 13:24:30)
[GCC 3.3.5 (propolice)] on openbsd4
Type "help", "copyright", "credits" or "license" for more information.
 >>> import flowd
 >>> flows = flowd.FlowLog("flowd-blah.log", "rb")
 >>> for flow in flows:
...     print flow.format()
...
zsh: 19122 bus error (core dumped)  env MALLOC_OPTIONS=AFGJP python2.4
selenium:~ % gdb /usr/local/bin/python2.4
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.
This GDB was configured as "sparc64-unknown-openbsd4.2"...
(no debugging symbols found)

(gdb) core-file python2.4.core
Core was generated by `python2.4'.
Program terminated with signal 10, Bus error.
Reading symbols from /usr/local/lib/libpython2.4.so.0.0...done.
Loaded symbols for /usr/local/lib/libpython2.4.so.0.0
Reading symbols from /usr/lib/libutil.so.11.0...done.
Loaded symbols for /usr/lib/libutil.so.11.0
Reading symbols from /usr/lib/libstdc++.so.42.0...done.
Loaded symbols for /usr/lib/libstdc++.so.42.0
Reading symbols from /usr/lib/libm.so.2.3...done.
Loaded symbols for /usr/lib/libm.so.2.3
Reading symbols from /usr/lib/libpthread.so.8.0...done.
Loaded symbols for /usr/lib/libpthread.so.8.0
Reading symbols from /usr/lib/libc.so.41.0...done.
Loaded symbols for /usr/lib/libc.so.41.0
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
Reading symbols from /usr/local/lib/python2.4/lib-dynload/ 
readline.so...done.
Loaded symbols for /usr/local/lib/python2.4/lib-dynload/readline.so
Reading symbols from /usr/lib/libreadline.so.3.0...done.
Loaded symbols for /usr/lib/libreadline.so.3.0
Reading symbols from /usr/lib/libncurses.so.10.0...done.
Loaded symbols for /usr/lib/libncurses.so.10.0
Reading symbols from /usr/local/lib/python2.4/site-packages/ 
flowd.so...done.
Loaded symbols for /usr/local/lib/python2.4/site-packages/flowd.so
#0  0x00000000481c4024 in object_to_u64 (o=0x4eb44150, u64=0x4281a4cc)
     at flowd_python.c:159
159                     return (0);
(gdb) bt
#0  0x00000000481c4024 in object_to_u64 (o=0x4eb44150, u64=0x4281a4cc)
     at flowd_python.c:159
#1  0x00000000481c409c in flowobj_normalise (f=0x4281a400)
     at flowd_python.c:174
#2  0x00000000481c4680 in flow_format (self=0x4281a400, args=0x4281a400,
     kw_args=0x0) at flowd_python.c:271
#3  0x000000004b9af5b8 in PyCFunction_Call (func=0x4eb5fbd8,  
arg=0x4c086050,
     kw=0x4281a400)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Objects/ 
methodobject.c:77
#4  0x000000004b9f1640 in call_function (pp_stack=0xffffffffffffabf8,  
oparg=0)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
ceval.c:3568
#5  0x000000004b9eea58 in PyEval_EvalFrame (f=0x4c1ab420)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
ceval.c:2167
#6  0x000000004b9ef6ec in PyEval_EvalCodeEx (co=0x4eb3fdc0,
     globals=0x4eb5fd8c, locals=0x4c1ab400, args=0x0, argcount=0,  
kws=0x0,
     kwcount=0, defs=0x0, defcount=0, closure=0x0)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
ceval.c:2741
#7  0x000000004b9ec290 in PyEval_EvalCode (co=0x4eb3fdc0,  
globals=0x4c1ab5a8,
     locals=0x49b5da20)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
ceval.c:484
#8  0x000000004ba14a3c in run_node (n=0x0, filename=0x49b5da20 "",
     globals=0x49b5da20, locals=0x49b5da20, flags=0x49b5da20)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
pythonrun.c:1285---Type <return> to continue, or q <return> to quit---

#9  0x000000004ba13350 in PyRun_InteractiveOneFlags  
(fp=0xffffffffffffffff,
     filename=0x4bb3ea60 "<stdin>", flags=0xffffffffffffb22c)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
pythonrun.c:771
#10 0x000000004ba130a0 in PyRun_InteractiveLoopFlags (fp=0x413217a0,
     filename=0x4bb3ea60 "<stdin>", flags=0xffffffffffffb22c)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
pythonrun.c:704
#11 0x000000004ba12fe8 in PyRun_AnyFileExFlags (fp=0x413217a0,
     filename=0x4bb3ea60 "<stdin>", closeit=0, flags=0xffffffffffffb22c)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Python/ 
pythonrun.c:667
#12 0x000000004ba1bdec in Py_Main (argc=1, argv=0xffffffffffffb428)
     at /u/obj/ports/Python-2.4.4-no_tkinter/Python-2.4.4/Modules/ 
main.c:493
#13 0x0000000000101118 in ___start ()
#14 0x0000000045402f24 in _dl_start () from /usr/libexec/ld.so
#15 0x0000000045402f24 in _dl_start () from /usr/libexec/ld.so
Previous frame identical to this frame (corrupt stack?)



More information about the netflow-tools mailing list