First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 227793
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo VPS Team <vserver-devs@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Luca Lesinigo <luckyluke@softhome.net>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
diet-mmap-test.tgz test case application/octet-stream Luca Lesinigo 2008-06-17 12:19 0000 1.03 KB Details
dietlibc-hppa_mmap.diff patch to fix on HPPA patch Luca Lesinigo 2008-11-02 20:11 0000 425 bytes Details | Diff
dietlibc-0.32_pre20080829.ebuild ebuild to apply the fix on HPPA only text/plain Luca Lesinigo 2008-11-02 20:17 0000 1.58 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 227793 depends on: Show dependency tree
Bug 227793 blocks: 227429
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-06-17 12:18 0000
The mmap() function of dietlibc-0.30-r2 (stable in portage) and -0.31 (bug
#227429) will always fail with ENODEV in some circumstances.

The mmap_test.c included with the lib could be used as a test case but it must
be compiled with LargeFile support. The bug will not show up without LargeFile.

So far I found this only on hppa, changing or removing CFLAGS doesn't make any
difference. daniel_hozac of #vserver/OFTC (thanks for help) says other archs
should be unaffected since parisc is the only one with different syscall
functions.

Tested so far, with bug:
dietlibc-0.30-r1 gcc-4.1.1 HPPA
dietlibc-0.30-r1 gcc-4.1.2 HPPA
dietlibc-0.31    gcc-4.1.2 HPPA

Tested so far, without bug:
dietlibc-0.31    gcc-3.4.6 x86_64/hardenedtoolchain
dietlibc-0.29-8  gcc-4.0?  i386 (ubuntu 6.06.2 precompiled deb)

------- Comment #1 From Luca Lesinigo 2008-06-17 12:19:26 0000 -------
Created an attachment (id=157255) [edit]
test case

This is a quick script that'll use dietlibc's mmap_test.c to check for the
issue.

------- Comment #2 From Luca Lesinigo 2008-09-16 20:09:47 0000 -------
dev-libs/dietlibc-0.32_pre20080829 still uncorrected

------- Comment #3 From Luca Lesinigo 2008-11-02 20:11:40 0000 -------
Created an attachment (id=170570) [edit]
patch to fix on HPPA

------- Comment #4 From Luca Lesinigo 2008-11-02 20:17:08 0000 -------
Created an attachment (id=170572) [edit]
ebuild to apply the fix on HPPA only

the included ebuild will apply the patch only when compiling on HPPA to fix the
mmap() issue. Many thanks to Bertl of #vserver @ OFTC for providing the fix.

The patch will probably mess up other archs so in the ebuild I only apply it
when USE=hppa.

Upstream (fefe.de) has already been informed of this but I think we'll have to
fix the problem by ourselves for some time before a properly fixed dietlibc
will come out.

------- Comment #5 From Guy Martin 2008-11-15 14:00:14 0000 -------
vserver guys ? Anyone please to commit this simple fix ?

Do you want me to commit it ?
I'd really like to get this fixed on hppa.

Thanks

------- Comment #6 From Benedikt Böhm 2008-11-16 14:14:32 0000 -------
i have merged the latest changes from upstream and the mmap patch into
0.32_pre20081116, please give it a try

------- Comment #7 From Luca Lesinigo 2008-11-16 19:59:35 0000 -------
dev-libs/dietlibc-0.32_pre20081116 compiles fine on HPPA with:
 CFLAGS="-pipe -O2 -march=2.0"
 MAKEOPTS="-j3"
 glibc-2.7-r2
 both gcc-4.2.4 and gcc-4.3.2

the mmap() issue of this bug is solved as proved by the attached test case.
it still suffers bug #221961

as example of a working application, after putting in place the workaround for
#221961 (symlink) sys-cluster/util-vserver will compile and run fine.

please note that if you used the patch I included in this report, it'll
probably mess up other archs, so you'll need to test it on non-hppa systems to
be sure. that's why I conditionally included the patch from the ebuild only on
hppa.

thanks.

------- Comment #8 From Benedikt Böhm 2008-11-16 22:01:51 0000 -------
(In reply to comment #7)
> please note that if you used the patch I included in this report, it'll
> probably mess up other archs, so you'll need to test it on non-hppa systems to
> be sure. that's why I conditionally included the patch from the ebuild only on
> hppa.

i added #ifdef __hppa__ around the syscall, so it only applies for hppa

First Last Prev Next    No search results available      Search page      Enter new bug