Bug 16502 - libc __nss_passwd_lookup
Summary: libc __nss_passwd_lookup
Status: RESOLVED DUPLICATE of bug 12100
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-24 09:42 UTC by Chris
Modified: 2014-06-13 08:52 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2014-01-24 09:42:47 UTC
After install glibc-2.18-r1 on gentoo i have problem with running some apps used jvm. 

Details:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xf6bd5c7d, pid=6266, tid=4138243840
#
# JRE version: 6.0_45-b06
# Java VM: Java HotSpot(TM) Client VM (20.45-b01 mixed mode, sharing linux-x86 )
# Problematic frame:
# C  [libc.so.6+0x12ac7d]  __nss_passwd_lookup+0x45d
Comment 1 Chris 2014-01-29 12:34:38 UTC
Problem solved.
Comment 2 Siddhesh Poyarekar 2014-01-29 12:38:40 UTC
The problem was not solved in glibc sources, so it is obviously not a glibc bug and hence, the bug should be closed as INVALID, not FIXED.
Comment 3 Chris 2014-01-29 14:02:06 UTC
(In reply to Siddhesh Poyarekar from comment #2)
> The problem was not solved in glibc sources, so it is obviously not a glibc
> bug and hence, the bug should be closed as INVALID, not FIXED.

Patch concerned glibc sources, precisely sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c  file.
Comment 4 Siddhesh Poyarekar 2014-01-29 19:33:47 UTC
(In reply to Chris from comment #3)
> Patch concerned glibc sources, precisely sysdeps/x86_64/multiarch/strstr.c
> b/sysdeps/x86_64/multiarch/strstr.c  file.

Is this an upstream patch?  If so, please provide the git commit id so that anyone referring to this bug would know what fixed it.  For all you know, it could even be a duplicate of another existing bug.

If it is an upstream bug and you've fixed it for yourself and decided to not contribute the patch upstream, then I would prefer to keep this bug open till someone else runs into this bug and decides to post a patch to fix it.
Comment 5 Chris 2014-01-30 06:09:48 UTC
(In reply to Siddhesh Poyarekar from comment #4)
> (In reply to Chris from comment #3)
> > Patch concerned glibc sources, precisely sysdeps/x86_64/multiarch/strstr.c
> > b/sysdeps/x86_64/multiarch/strstr.c  file.
> 
> Is this an upstream patch?  If so, please provide the git commit id so that
> anyone referring to this bug would know what fixed it.  For all you know, it
> could even be a duplicate of another existing bug.
> 
> If it is an upstream bug and you've fixed it for yourself and decided to not
> contribute the patch upstream, then I would prefer to keep this bug open
> till someone else runs into this bug and decides to post a patch to fix it.

I really don't care about yours "Status" of bug. I see it's most important thing for you.

Patch is realy simple:

Source: .../sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c

--- a/sysdeps/x86_64/multiarch/strstr.c
+++ b/sysdeps/x86_64/multiarch/strstr.c
@@ -86,7 +86,7 @@
 /* Simple replacement of movdqu to address 4KB boundary cross issue.
    If EOS occurs within less than 16B before 4KB boundary, we don't
    cross to next page.  */
-static __m128i
+static inline __m128i
 __m128i_strloadu (const unsigned char * p, __m128i zero)
 {
   if (__builtin_expect ((int) ((size_t) p & 0xfff) > 0xff0, 0)) 


I dont't know sources of glibc but for me someone forgot to add "inline" to __m128i_strloadu. After add it, everything works just fine. 

Lack of this caused errors in acroread too (access memory violation and it douesn't work).
Comment 6 Allan McRae 2014-01-30 06:55:57 UTC
This is the i686 issue with __strstr_sse42 and unaligned stack.  This has been "fixed" by 1818483b.
Comment 7 Siddhesh Poyarekar 2014-01-30 07:11:38 UTC
(In reply to Allan McRae from comment #6)
> This is the i686 issue with __strstr_sse42 and unaligned stack.  This has
> been "fixed" by 1818483b.

Thanks Allan - that's the patch the completes Ondrej's performance regression fix in bug 12100.  The patch in comment 5 is no longer valid and may even be simply hiding another bug.  I'll keep this open as UNCONFIRMED since we have no information on why the crash occurs or why the patch fixes it.  If this bug is still present in 2.19 (and a valid glibc bug), someone will hit it and hopefully give some more information.

(In reply to Chris from comment #5)
> I really don't care about yours "Status" of bug. I see it's most important
> thing for you.

Good job mischaracterizing my concern.  If you cannot help with the development and maintenance process then at least don't try to dictate how the process should run.
Comment 8 Allan McRae 2014-01-30 07:16:40 UTC
I should have been more clear.  This is a gcc bug that was exposed when removing the inline statements.  Details are given in [1]. So removing the SSE4.2 implementation completely removes this bug.

[1] https://sourceware.org/glibc/wiki/Release/2.18#Packaging_Changes
Comment 9 Siddhesh Poyarekar 2014-01-30 07:20:00 UTC
(In reply to Allan McRae from comment #8)
> I should have been more clear.  This is a gcc bug that was exposed when
> removing the inline statements.  Details are given in [1]. So removing the
> SSE4.2 implementation completely removes this bug.
> 
> [1] https://sourceware.org/glibc/wiki/Release/2.18#Packaging_Changes

Mid-air collision - that struck me the moment I hit submit.  Closing this as duplicate of 12100.

*** This bug has been marked as a duplicate of bug 12100 ***