On 02/08/16 02:36, sf...@users.sourceforge.net wrote:
> Hello OmegaPhil,
> 
> OmegaPhil:
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007fbd72a6988e in rdu_buf_lock () from /usr/lib/libau.so
>> (gdb) bt
>> #0  0x00007fbd72a6988e in rdu_buf_lock () from /usr/lib/libau.so
>> #1  0x00007fbd72a69e81 in closedir () from /usr/lib/libau.so
>       :::
>> This is associated with /usr/lib/openssh/sftp-server. I've tried to
>> build the aufs-util source with debugging information by changing the
>> 'override CFLAGS' to:
>>
>> override CFLAGS +=3D -Og -Wall -ggdb3
>>
>> Make clean and then making as usual.
>>
>> However libau.so.2.7 is always built with no debugging symbols:
> 
> Thanx for an interesting report.
> There may exists a bug in rdu_buf_lock().
> 
> Other than CFLAGS, you need to set LDFLAGS. Probably "INSTALL" or
> "Install" too.
> In Makefile, LDFLAGS is set as
>       ${LibSo}.${LibSoMajor}.${LibSoMinor}: override LDFLAGS += -s
> This '-s' means to strip.
> 
> And "Install" is
>       Install = ${INSTALL} -o root -g root -p
> "INSTALL" is set by make(1) and it may be set -s/--strip option on your
> system. But you will find out easily if you look 'make's output
> carefully.
> 
> Also you may want to add -UNDEBUG to CPPFLAGS, in order to enable the
> assertions for the debugging purpose.
> 
> 
> How do you set your LIBAU environment variable? Usually it is set as
> "all".
> 
> 
> J. R. Okajima


Thanks - so yet another thing strips useful debugging information (ld
was doing it due to you adding '-s' in the two Makefiles, install
doesn't strip by default).

Here is the stack trace:

==================================================================

Thread 1 (Thread 0x7f26eadde700 (LWP 13688)):
#0  0x00007f26ea9b172c in rdu_append (p=p@entry=0x55879e9e0460) at
rdu_lib.c:100
        err = 0
        i = <optimized out>
        t = <optimized out>
#1  0x00007f26ea9b17f2 in rdu_new (fd=fd@entry=3) at rdu_lib.c:131
        p = 0x55879e9e0460
        err = <optimized out>
#2  0x00007f26ea9b1c28 in rdu_buf_lock (fd=fd@entry=3) at rdu_lib.c:165
        p = 0x0
        i = <optimized out>
#3  0x00007f26ea9b1ecc in closedir (dir=0x55879e9e7ac0) at rdu_lib.c:464
        err = 0
        fd = 3
        stfs = {f_type = 1635083891, f_bsize = 4096, f_blocks =
3662826402, f_bfree = 1381919247,
          f_bavail = 1377817285, f_files = 0, f_ffree = 0, f_fsid =
{__val = {0, 0}},
          f_namelen = 242, f_frsize = 4096, f_flags = 4128, f_spare =
{0, 0, 0, 0}}
        p = <optimized out>
#4  0x000055879d3ab2ff in ?? ()
No symbol table info available.
#5  0x000055879d3ac952 in ?? ()
No symbol table info available.
#6  0x00007f26ea628730 in __libc_start_main (main=0x55879d3a8bf0,
argc=1, argv=0x7ffee521f908,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized
out>, stack_end=0x7ffee521f8f8)
    at ../csu/libc-start.c:291
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0,
9006793732130597009, 94040946805856,
                140732742629632, 0, 0, 2885821205361453201,
3007385983674738833},
              mask_was_saved = 0}}, priv = {pad = {0x0, 0x0,
0x7ffee521f918, 0x7f26eaddd168}, data = {
              prev = 0x0, cleanup = 0x0, canceltype = -450758376}}}
        not_first_call = <optimized out>
#7  0x000055879d3a8c89 in ?? ()
No symbol table info available.

==================================================================

'               rdu[rdu_cur++] = p;' is failing as rdu is NULL.

Yeah LIBAU is set to all.

In '/etc/ssh/sshd_config':
PermitUserEnvironment yes

Then in ~/.ssh/environment for the user logging in:
LD_PRELOAD=/usr/lib/libau.so
LIBAU=all

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------

Reply via email to