Bug 5229 - segmentation fault after lp_load() call
Summary: segmentation fault after lp_load() call
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Jelmer Vernooij
QA Contact: Andrew Bartlett
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-25 07:54 UTC by Rafał Cygnarowski
Modified: 2009-08-03 02:37 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Cygnarowski 2008-01-25 07:54:18 UTC
I was trying to port my program which was using libcli_smb from Samba 4 alpha 1 release to alpha 2 but it crashes every time after lp_load() call. Here is the simplest version for testing and backtrace.

/* main.c - begin */
#include "includes.h"
#include "param/param.h"
#include "param/proto.h"
#include "ldb.h"
#include "dynconfig.h"

int main (int argc, char *argv[])
{
        struct loadparm_context *lp_ctx;

        fault_setup(argv[0]);
        global_loadparm = lp_ctx = loadparm_init(talloc_autofree_context());

        if (getenv("SMB_CONF_PATH"))
                lp_load(lp_ctx, getenv("SMB_CONF_PATH"));
        else
                lp_load(lp_ctx, dyn_CONFIGFILE);

        return 0;
}
/* main.c - end */

PANIC: internal error
BACKTRACE: 10 stack frames:
 #0 /usr/lib/libcli_smb.so.0(call_backtrace+0x2d) [0xb7eb06b7]
 #1 /usr/lib/libcli_smb.so.0(smb_panic+0x6e) [0xb7eb07d4]
 #2 /usr/lib/libcli_smb.so.0 [0xb7eb0a92]
 #3 [0xb7f4c420]
 #4 /usr/lib/libcli_smb.so.0(lp_parm_bool+0x38) [0xb7eaeb91]
 #5 /usr/lib/libcli_smb.so.0(smb_iconv_convenience_init_lp+0x43) [0xb7eaf995]
 #6 /usr/lib/libcli_smb.so.0(reload_charcnv+0x3d) [0xb7eafa1c]
 #7 /usr/lib/libcli_smb.so.0(lp_load+0x12b) [0xb7eae8bf]
 #8 ./smbclitest [0x80485e8]
 #9 /lib/libc.so.6(__libc_start_main+0xe3) [0xb7b1c3d3]
Comment 1 Matthias Dieter Wallnöfer 2008-03-13 14:20:09 UTC
Is this reproducible on recent GIT releases?
Comment 2 Rafał Cygnarowski 2008-04-27 04:51:07 UTC
(In reply to comment #1)
> Is this reproducible on recent GIT releases?
> 

Not any more. It seems to be fixed.
Comment 3 Matthias Dieter Wallnöfer 2009-08-03 02:37:06 UTC
I think the version numbers for SAMBA 4 Alpha/TP aren't worth to keep since we don't support any versions longer yet. Because all bugs filed will be propagated from version to version until they are fixed (for now at least) this field isn't necessary yet.