Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parted - 3.6-1 fails with segmentation fault on asuswrt-merlin #1015

Closed
ColinTaylorUK opened this issue Feb 3, 2024 · 3 comments
Closed

Comments

@ColinTaylorUK
Copy link

Describe the bug
parted - 3.6-1: parted command refuses to run because it says "You found a bug in GNU Parted!"

Running most parted commands results in the error above. The only option that partially works is -l (list all partitions).

Environment (please complete the following information):

  • Entware feed: aarch64-k3.10
  • Device Asus: RT-AX86U router
  • Firmware version: ASUSWRT-Merlin 3004.388.5_0
@ColinTaylorUK
Copy link
Author

Still happening on Firmware version: ASUSWRT-Merlin 3004.388.7_0

# parted /dev/sda unit co print unit s print


You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:

        http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:

        http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (3.6)
along with the error message below, the output of

        parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Command History:
Segmentation fault

@ColinTaylorUK ColinTaylorUK changed the title parted - 3.6-1 fails on asuswrt-merlin parted - 3.6-1 fails with segmentation fault on asuswrt-merlin Aug 22, 2024
@ColinTaylorUK
Copy link
Author

ColinTaylorUK commented Aug 22, 2024

Found a clue to the problem here: https://bugs.gentoo.org/646104

Setting the locale to anything other that ru_RU.UTF-8, en_US.UTF-8, POSIX or C causes the segmentation violation. I had mine set to en_GB.UTF-8 but I also tried de_DE.UTF-8, fr_FR.UTF-8 and it_IT.UTF-8.

More specifically, the problem is with the LC_CTYPE variable, e.g.:

# export LANG='en_GB.UTF-8'
# LC_CTYPE=C parted /dev/sda print
Model: TOSHIBA USB FLASH DRIVE (scsi)
Disk /dev/sda: 31.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      16.4kB  15.5GB  15.5GB  primary  ext4
 2      15.5GB  31.0GB  15.5GB  primary  fat32

@ColinTaylorUK
Copy link
Author

Fixed by adding en_GB to locale archive (see /opt/lib/opkg/info/locales.postinst).

# localedef.new -f UTF-8 -i en_GB en_GB.UTF-8
# locale.new -a
C
en_GB.utf8
en_US.utf8
POSIX
ru_RU.utf8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant