Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704704 - sys-block/parted-3.3 USE=-debug - parted: segmentation fault in __freelocale (dataset=dataset@entry=0x0) at freelocale.c:4
Summary: sys-block/parted-3.3 USE=-debug - parted: segmentation fault in __freelocale ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo LiveCD Package Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-03 13:40 UTC by Francesco Turco
Modified: 2020-01-03 17:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info sys-block/parted (info.txt,6.68 KB, text/plain)
2020-01-03 13:41 UTC, Francesco Turco
Details
gdb backtrace (parted.log,1.04 KB, text/plain)
2020-01-03 13:42 UTC, Francesco Turco
Details
/etc/portage/patches/sys-block/parted/parted-3.3-atari.patch (parted-3.3-atari.patch,230 bytes, patch)
2020-01-03 14:14 UTC, Jeroen Roovers (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Turco 2020-01-03 13:40:02 UTC
Parted 3.3 fails with a segmentation fault when I run simple commands such as:

# parted /dev/sda quit

This only happens when sys-block/parted-3.3 has been emerged without the "debug" USE flag. The same command doesn't fail when I enable the "debug" USE flag for sys-block/parted-3.3.

See also bug #646104 for a similar problem (with an older version of parted).
Comment 1 Francesco Turco 2020-01-03 13:41:54 UTC
Created attachment 602402 [details]
emerge --info sys-block/parted
Comment 2 Francesco Turco 2020-01-03 13:42:28 UTC
Created attachment 602404 [details]
gdb backtrace
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-03 13:57:38 UTC
Looks like a problem that was fixed in an earlier Debian patch.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-03 14:14:58 UTC
Created attachment 602406 [details, diff]
/etc/portage/patches/sys-block/parted/parted-3.3-atari.patch

Does this fix it for you?
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-03 14:20:44 UTC
(In reply to Jeroen Roovers from comment #3)
> Looks like a problem that was fixed in an earlier Debian patch.

(I was wrong about that. Atari disk label support was earlier added by a Debian patch but has since been accepted upstream.)
Comment 6 Francesco Turco 2020-01-03 14:24:36 UTC
Your parted-3.3-atari.patch seems to fix the problem. Thanks!
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-03 14:34:14 UTC
(In reply to Francesco Turco from comment #6)
> Your parted-3.3-atari.patch seems to fix the problem. Thanks!

But it breaks compiling with USE=debug. At least I now know how to really fix it.
Comment 8 Larry the Git Cow gentoo-dev 2020-01-03 14:49:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1af57544e419afdbc54cb6dc76e053593e4bb088

commit 1af57544e419afdbc54cb6dc76e053593e4bb088
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2020-01-03 14:47:20 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2020-01-03 14:49:17 +0000

    sys-block/parted: Fix segfault when USE=-debug
    
    PED_ASSERT does funky stuff to atr_c_locale when USE=-debug, causing
    freelocale() to fail on exiting labels/atari.c.
    
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Closes: https://bugs.gentoo.org/704704
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 sys-block/parted/files/parted-3.3-atari.patch                | 11 +++++++++++
 sys-block/parted/{parted-3.3.ebuild => parted-3.3-r1.ebuild} |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)
Comment 9 Larry the Git Cow gentoo-dev 2020-01-03 15:14:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4bab6569878f89180d50a40524a675712b0cec2a

commit 4bab6569878f89180d50a40524a675712b0cec2a
Author:     Jeroen Roovers <jer@gentoo.org>
AuthorDate: 2020-01-03 15:13:06 +0000
Commit:     Jeroen Roovers <jer@gentoo.org>
CommitDate: 2020-01-03 15:14:45 +0000

    sys-block/parted: Reintroduce PED_ASSERT with correct assertion
    
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Bug: https://bugs.gentoo.org/704704
    Fixes: 1af57544e419afdbc54cb6dc76e053593e4bb088
    Signed-off-by: Jeroen Roovers <jer@gentoo.org>

 sys-block/parted/files/parted-3.3-atari.patch                   | 2 +-
 sys-block/parted/{parted-3.3-r1.ebuild => parted-3.3-r2.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 10 Francesco Turco 2020-01-03 16:39:26 UTC
Unfortunately, after upgrading parted to version 3.3-r2 and emerging it without the "debug" USE flag, I can produce a segmentation fault again with:

# parted /dev/sda quit
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2020-01-03 17:22:12 UTC
(In reply to Francesco Turco from comment #10)
> Unfortunately, after upgrading parted to version 3.3-r2 and emerging it
> without the "debug" USE flag, I can produce a segmentation fault again with:
> 
> # parted /dev/sda quit

I didn't see that in local testing. I'll revert to 3.3-r1, I guess.