Strange crash of locally created TB under Debian GNU/Linux 64-bit

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange crash of locally created TB under Debian GNU/Linux 64-bit

ISHIKAWA,chiaki
For the last few days, after about 10 - 14 days of not working on the  
code, I tried to compile and run the latest source of TB from comm-central.

I got a crash due to, it seems, some unaligned call of memset primitive.

I tried GCC 6, 5, and 4 in that order,
and I saw consistent crash in a memset call that seemed to result in
unaligned access (?) under Debian GNU/Linux.

I suspect a code issue on the mozilla side and also a runtime library  
bug or something.
Since I don't seem to hear much about this crash, I suspect a runtime  
library bug under Debian GNU/Linux 64-bit which I use.

Has anyone seen a similar bug under Debian GNU/Linux?

Here is the trace from a binary compiled with gcc-4 under gdb.

Either a bug in the library or the alignment and packing of data  
changed??? (But it seems odd that GCC-6, 5, and 4 all produced crashing  
code.)

The program crashed and I typed where
to get the stacktrace.

#0  0x00007ffff6e031f3 in __memset_sse2_unaligned_erms ()
     at  
../sysdeps/x86_64/multiarch/../multiarch/memset-vec-unaligned-erms.S:175
#1  0x00007fffdc054210 in sftkdb_fixupTemplateOut (template=<optimized  
out>, objectID=<optimized out>, ntemplate=<optimized out>,  
count=<optimized out>, handle=<optimized out>)
     at  
/NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/sftkdb.c:367
#2  0x00007fffdc054dc7 in sftkdb_GetAttributeValue (handle=<optimized  
out>, objectID=<optimized out>, template=<optimized out>,  
count=<optimized out>)
     at  
/NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/sftkdb.c:1324
#3  0x00007fffdc04dfdc in sftk_FindTokenAttribute (object=<optimized  
out>, type=<optimized out>)
     at  
/NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/pkcs11u.c:131
#4  0x00007fffdc04ed99 in sftk_FindAttribute (object=<optimized out>,  
type=<optimized out>)
     at  
/NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/pkcs11u.c:177

Here is the version info of the library (crude first cut info.)

ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$ ldd  
../objdir-tb3/dist/bin/thunderbird
        linux-vdso.so.1 (0x00007ffe5af70000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0  
(0x00007f4bdb02d000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4bdae29000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6  
(0x00007f4bdaaa8000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4bda7a4000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4bda58d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4bda1ed000)
        /lib64/ld-linux-x86-64.so.2 (0x000055823c6cc000)
ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$

cf.  The library seems to be compiled by GCC-6.

  strings /lib/x86_64-linux-gnu/libc.so.6 | grep -i version
versionsort64
versionsort
argp_program_version_hook
gnu_get_libc_version
argp_program_version
RPC: Incompatible versions of RPC
RPC: Program/version mismatch
<malloc version="1">
Print program version
(PROGRAM ERROR) No version known!?
%s: %s; low version = %lu, high version = %lu
GNU C Library (Debian GLIBC 2.24-7) stable release version 2.24, by  
Roland McGrath et al.
Compiled by GNU CC version 6.2.1 20161124.
        crypt add-on version 2.1 by Michael Glad and others
.gnu.version
.gnu.version_d
.gnu.version_r
ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$


So this might as well be GCC-6 bug.


TIA
_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Strange crash of locally created TB under Debian GNU/Linux 64-bit

ISHIKAWA,chiaki
After several source updates and Debian package updates,
the crash disappeared. (Checking Debian GNU/Linux package error reports,
I think there was an issue on mozilla source code side that is triggered
with a subtle library issue. But I have no clear idea.)

But then I found an odd error.
When the mail directory in profile is a symlink to a directory in
another file system, and that file system is remotely mounted,
AND the remote found failed,
the mail directory is empty.

Instead of detecting this error condition immediately after startup,
TB simply pretends that there is no mail there.

However, I got suspicious and when I checked the account setup and chose
"Copies & Folders" there, an error dialog immediately popped up and said
basically the mail directory is invalid and choose an appropriate directory.

This is reproducible.

TB ought to check this condition and report it immediately after startup.
Early last year, when I was testing the buffered write issue, I think
TB detected this somehow early on without my going to account setup
dialog. (This setup is how I checked the error handling of read/write of
messages in a remotely-mounted directory.)

I will file a bug.

The next round of serious debugging will take place around Dec 20...

On 2016/12/06 2:00, ISHIKAWA,chiaki wrote:

> For the last few days, after about 10 - 14 days of not working on the
> code, I tried to compile and run the latest source of TB from comm-central.
>
> I got a crash due to, it seems, some unaligned call of memset primitive.
>
> I tried GCC 6, 5, and 4 in that order,
> and I saw consistent crash in a memset call that seemed to result in
> unaligned access (?) under Debian GNU/Linux.
>
> I suspect a code issue on the mozilla side and also a runtime library
> bug or something.
> Since I don't seem to hear much about this crash, I suspect a runtime
> library bug under Debian GNU/Linux 64-bit which I use.
>
> Has anyone seen a similar bug under Debian GNU/Linux?
>
> Here is the trace from a binary compiled with gcc-4 under gdb.
>
> Either a bug in the library or the alignment and packing of data
> changed??? (But it seems odd that GCC-6, 5, and 4 all produced crashing
> code.)
>
> The program crashed and I typed where
> to get the stacktrace.
>
> #0  0x00007ffff6e031f3 in __memset_sse2_unaligned_erms ()
>     at
> ../sysdeps/x86_64/multiarch/../multiarch/memset-vec-unaligned-erms.S:175
> #1  0x00007fffdc054210 in sftkdb_fixupTemplateOut (template=<optimized
> out>, objectID=<optimized out>, ntemplate=<optimized out>,
> count=<optimized out>, handle=<optimized out>)
>     at
> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/sftkdb.c:367
>
> #2  0x00007fffdc054dc7 in sftkdb_GetAttributeValue (handle=<optimized
> out>, objectID=<optimized out>, template=<optimized out>,
> count=<optimized out>)
>     at
> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/sftkdb.c:1324
>
> #3  0x00007fffdc04dfdc in sftk_FindTokenAttribute (object=<optimized
> out>, type=<optimized out>)
>     at
> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/pkcs11u.c:131
>
> #4  0x00007fffdc04ed99 in sftk_FindAttribute (object=<optimized out>,
> type=<optimized out>)
>     at
> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/pkcs11u.c:177
>
>
> Here is the version info of the library (crude first cut info.)
>
> ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$ ldd
> ../objdir-tb3/dist/bin/thunderbird
>     linux-vdso.so.1 (0x00007ffe5af70000)
>     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
> (0x00007f4bdb02d000)
>     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4bdae29000)
>     libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> (0x00007f4bdaaa8000)
>     libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4bda7a4000)
>     libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
> (0x00007f4bda58d000)
>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4bda1ed000)
>     /lib64/ld-linux-x86-64.so.2 (0x000055823c6cc000)
> ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$
>
> cf.  The library seems to be compiled by GCC-6.
>
>  strings /lib/x86_64-linux-gnu/libc.so.6 | grep -i version
> versionsort64
> versionsort
> argp_program_version_hook
> gnu_get_libc_version
> argp_program_version
> RPC: Incompatible versions of RPC
> RPC: Program/version mismatch
> <malloc version="1">
> Print program version
> (PROGRAM ERROR) No version known!?
> %s: %s; low version = %lu, high version = %lu
> GNU C Library (Debian GLIBC 2.24-7) stable release version 2.24, by
> Roland McGrath et al.
> Compiled by GNU CC version 6.2.1 20161124.
>     crypt add-on version 2.1 by Michael Glad and others
> .gnu.version
> .gnu.version_d
> .gnu.version_r
> ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$
>
>
> So this might as well be GCC-6 bug.
>
>
> TIA
> _______________________________________________
> dev-apps-thunderbird mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-apps-thunderbird
>
>

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird
Reply | Threaded
Open this post in threaded view
|

Re: Strange crash of locally created TB under Debian GNU/Linux 64-bit

ISHIKAWA,chiaki
Sorry for top posting.

After a couple of weeks, the crash appears again.
- The latest source code I checked out yesterday.
- the latest toolchain I upgraded under Debian GNU/Linux 64-bit.

It is the same error caused by
__memset_sse2_unaligned_erms ()

A few days ago, I saw somewhere in the mozilla mailing list that someone
is experiencing startup crash under Debian.
So I think I will move my post to dev-platform-ML or somewhere to see
others under Debian are suffering from the same issue.

TIA

On 2016/12/07 5:36, ISHIKAWA,chiaki wrote:

> After several source updates and Debian package updates,
> the crash disappeared. (Checking Debian GNU/Linux package error reports,
> I think there was an issue on mozilla source code side that is triggered
> with a subtle library issue. But I have no clear idea.)
>
> But then I found an odd error.
> When the mail directory in profile is a symlink to a directory in
> another file system, and that file system is remotely mounted,
> AND the remote found failed,
> the mail directory is empty.
>
> Instead of detecting this error condition immediately after startup,
> TB simply pretends that there is no mail there.
>
> However, I got suspicious and when I checked the account setup and chose
> "Copies & Folders" there, an error dialog immediately popped up and said
> basically the mail directory is invalid and choose an appropriate
> directory.
>
> This is reproducible.
>
> TB ought to check this condition and report it immediately after startup.
> Early last year, when I was testing the buffered write issue, I think
> TB detected this somehow early on without my going to account setup
> dialog. (This setup is how I checked the error handling of read/write of
> messages in a remotely-mounted directory.)
>
> I will file a bug.
>
> The next round of serious debugging will take place around Dec 20...
>
> On 2016/12/06 2:00, ISHIKAWA,chiaki wrote:
>> For the last few days, after about 10 - 14 days of not working on the
>> code, I tried to compile and run the latest source of TB from
>> comm-central.
>>
>> I got a crash due to, it seems, some unaligned call of memset primitive.
>>
>> I tried GCC 6, 5, and 4 in that order,
>> and I saw consistent crash in a memset call that seemed to result in
>> unaligned access (?) under Debian GNU/Linux.
>>
>> I suspect a code issue on the mozilla side and also a runtime library
>> bug or something.
>> Since I don't seem to hear much about this crash, I suspect a runtime
>> library bug under Debian GNU/Linux 64-bit which I use.
>>
>> Has anyone seen a similar bug under Debian GNU/Linux?
>>
>> Here is the trace from a binary compiled with gcc-4 under gdb.
>>
>> Either a bug in the library or the alignment and packing of data
>> changed??? (But it seems odd that GCC-6, 5, and 4 all produced crashing
>> code.)
>>
>> The program crashed and I typed where
>> to get the stacktrace.
>>
>> #0  0x00007ffff6e031f3 in __memset_sse2_unaligned_erms ()
>>     at
>> ../sysdeps/x86_64/multiarch/../multiarch/memset-vec-unaligned-erms.S:175
>> #1  0x00007fffdc054210 in sftkdb_fixupTemplateOut (template=<optimized
>> out>, objectID=<optimized out>, ntemplate=<optimized out>,
>> count=<optimized out>, handle=<optimized out>)
>>     at
>> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/sftkdb.c:367
>>
>>
>> #2  0x00007fffdc054dc7 in sftkdb_GetAttributeValue (handle=<optimized
>> out>, objectID=<optimized out>, template=<optimized out>,
>> count=<optimized out>)
>>     at
>> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/sftkdb.c:1324
>>
>>
>> #3  0x00007fffdc04dfdc in sftk_FindTokenAttribute (object=<optimized
>> out>, type=<optimized out>)
>>     at
>> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/pkcs11u.c:131
>>
>>
>> #4  0x00007fffdc04ed99 in sftk_FindAttribute (object=<optimized out>,
>> type=<optimized out>)
>>     at
>> /NREF-COMM-CENTRAL/comm-central/mozilla/security/nss/lib/softoken/pkcs11u.c:177
>>
>>
>>
>> Here is the version info of the library (crude first cut info.)
>>
>> ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$ ldd
>> ../objdir-tb3/dist/bin/thunderbird
>>     linux-vdso.so.1 (0x00007ffe5af70000)
>>     libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
>> (0x00007f4bdb02d000)
>>     libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4bdae29000)
>>     libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
>> (0x00007f4bdaaa8000)
>>     libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4bda7a4000)
>>     libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
>> (0x00007f4bda58d000)
>>     libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4bda1ed000)
>>     /lib64/ld-linux-x86-64.so.2 (0x000055823c6cc000)
>> ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$
>>
>> cf.  The library seems to be compiled by GCC-6.
>>
>>  strings /lib/x86_64-linux-gnu/libc.so.6 | grep -i version
>> versionsort64
>> versionsort
>> argp_program_version_hook
>> gnu_get_libc_version
>> argp_program_version
>> RPC: Incompatible versions of RPC
>> RPC: Program/version mismatch
>> <malloc version="1">
>> Print program version
>> (PROGRAM ERROR) No version known!?
>> %s: %s; low version = %lu, high version = %lu
>> GNU C Library (Debian GLIBC 2.24-7) stable release version 2.24, by
>> Roland McGrath et al.
>> Compiled by GNU CC version 6.2.1 20161124.
>>     crypt add-on version 2.1 by Michael Glad and others
>> .gnu.version
>> .gnu.version_d
>> .gnu.version_r
>> ishikawa@ip030:/NREF-COMM-CENTRAL/comm-central$
>>
>>
>> So this might as well be GCC-6 bug.
>>
>>
>> TIA
>> _______________________________________________
>> dev-apps-thunderbird mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-apps-thunderbird
>>
>>
>
> _______________________________________________
> dev-apps-thunderbird mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-apps-thunderbird
>
>

_______________________________________________
dev-apps-thunderbird mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-thunderbird