Summary: | net-fs/samba-4.2.7: 'net usershare info' produces a segmentation fault | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fabio Coatti <fabio.coatti> |
Component: | Current packages | Assignee: | Gentoo's SAMBA Team <samba> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Fabio Coatti
2016-01-06 09:50:56 UTC
(In reply to Fabio Coatti from comment #0) > (sorry for the italian, but it is simply a segfault, with core dump creation) You just need to do LC_ALL="C" $command > core file is not so useful, as samba is not compiled with debug options, > however I'm doing this right now. > Meanwhile, someone has suggestion about this issue? After compiling with debug(ggdb), and features splitdebug, you can start it with gdb. Did you try also to see if the problem persist with a simple set of cflags like only -O2 ? (In reply to Agostino Sarubbo from comment #1) > (In reply to Fabio Coatti from comment #0) > > (sorry for the italian, but it is simply a segfault, with core dump creation) > > You just need to do LC_ALL="C" $command No luck: cova@calvin ~ $ LC_ALL="C" net usershare info net usershare: usershares are currently disabled Errore di segmentazione (core dump creato) > > > > core file is not so useful, as samba is not compiled with debug options, > > however I'm doing this right now. > > Meanwhile, someone has suggestion about this issue? > > After compiling with debug(ggdb), and features splitdebug, you can start it > with gdb. > Did you try also to see if the problem persist with a simple set of cflags > like only -O2 ? compiled as follows: CFLAGS="-ggdb -O2" CXXFLAGS="${CFLAGS}" FEATURES="splitdebug installsources" Same as before: if launched immediately after emerging it, no SEGV. Reboot, same command segfaults. /me puzzled. Core was generated by `net usershare info'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f85bc7a29da in ?? () from /lib64/libc.so.6 (gdb) bt #0 0x00007f85bc7a29da in ?? () from /lib64/libc.so.6 #1 0x00007f85bae99f75 in tdb_wrap_open (mem_ctx=mem_ctx@entry=0x0, name=name@entry=0x0, hash_size=hash_size@entry=0, tdb_flags=tdb_flags@entry=6337, open_flags=open_flags@entry=0, mode=mode@entry=420) at ../lib/tdb_wrap/tdb_wrap.c:146 #2 0x00007f85c1418f80 in gencache_init () at ../source3/lib/gencache.c:118 #3 0x00007f85c14194e5 in gencache_init () at ../source3/lib/gencache.c:672 #4 gencache_stabilize () at ../source3/lib/gencache.c:631 #5 0x0000556a27c0eed0 in main (argc=<optimized out>, argv=0x7ffceecfdfd8) at ../source3/utils/net.c:965 After some debugging, this seems to happen if /var/lock/samba/ does not exist. This happens on my system because /var/lock is a symlink to /run/lock, that is mounted on tmpfs, thus deleted at every reboot. Probably this should be taken care by in some init script (I'm using systemd), however I opened a bug upstream, to see if a segfault can be avoided and a more informative error printed. upstream bug: https://bugzilla.samba.org/show_bug.cgi?id=11663 Interesting, I have no samba running on my system and thus no init script obviously ok to use to create the missing path :) |