Page 1 of 1

Samba: PANIC (pid #): Bad talloc magic value - access...

Posted: Sun Dec 17, 2017 12:59 am
by gilthanaz
[Problem]
Today I did set up a minimal samba config for quick file transfer as I've done dozens of times already. To my surprise, when trying to connect from a windows box to the showing share, I got an access denied error. The log files on the samba server showed a long stack trace, so apparently something hit the wall:

Code: Select all

 [2017/12/16 20:20:30.464869,  0] ../source3/lib/popt_common.c:68(popt_s3_talloc_log_fn)
 Bad talloc magic value - access after free
 [2017/12/16 20:20:30.465215,  0] ../source3/lib/util.c:789(smb_panic_s3)
  PANIC (pid 7513): Bad talloc magic value - access after free

[Solution]

I followed the white rabbit until it looked like a library was the culprit and a new google search with those additional infos pointed me to this thread, where shane-hill suggested to reinstall shared libs that might be the issue:

Code: Select all

$ sudo apt-get install --reinstall libsmbclient libsmbclient-dev libtevent0 libtalloc2
$ sudo service smbd restart
$ sudo service nmbd restart
... and that was it! As stated below in the linked thread, the most likely cause is that a library (in my case libtalloc2) was either mis-versioned or not installed at all due to a mistake in the dep-tree when installing the samba server. I can now connect to the share as expected without any further problems. Yay! Note: It might not be necessary to re/install all the above libs, e.g. most people probably won't need the dev libs :)