Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1357988 - creating a partition with size 0.002G results in a crash
Summary: creating a partition with size 0.002G results in a crash
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-19 18:22 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2017-01-05 14:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-05 14:26:49 UTC


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2016-07-19 18:22:04 UTC
Description of problem:
I tried (by mistake) to create a partition bigger than the free space (0.002G vs 1MB).

                                          Disk: /dev/vda
                        Size: 21 GiB, 22548578304 bytes, 44040192 sectors
                   Label: gpt, identifier: 45CFE53B-FD89-4808-B017-A62CC59A402B

    Device                    Start           End       Sectors         Size Type
    Free space                 2048          2048             0           0B
    /dev/vda1                  2048        411647        409600         200M EFI System
    /dev/vda2                411648       1435647       1024000         500M Linux filesystem
    /dev/vda3               1435648      41940991      40505344        19.3G Linux LVM
>>  Free space             41940992      41943006          2015      1007.5K                      

cfdisk: libfdisk/src/table.c:410: new_freespace: Assertion `end > start' failed.
Aborted

Version-Release number of selected component (if applicable):
util-linux-2.28-2.fc25.x86_64

How reproducible:
100%

(gdb) bt full
#0  0x00007f793e952945 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
        resultvar = 0
        pid = 9033
        selftid = 9033
#1  0x00007f793e95454a in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x7ffe74fe3cd0, sa_sigaction = 0x7ffe74fe3cd0}, sa_mask = {__val = {94683498852443, 140730861239584, 4, 1962819024, 140158742499328, 140158737624218, 410, 140158737625144, 94683498860944, 0, 140158718063196, 140158719154816, 140158719140472, 472446402651, 140158719140472, 140158737624218}}, sa_flags = 1074728960, sa_restorer = 0x7f793fc4ac9a}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007f793e94aeb7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7f793fc4ac9a "end > start", file=file@entry=0x7f793fc4ac81 "libfdisk/src/table.c", line=line@entry=410, function=function@entry=0x7f793fc4b038 <__PRETTY_FUNCTION__.6839> "new_freespace") at assert.c:92
        str = 0x561d38576620 "\240\273W8\035V"
        total = 4096
#3  0x00007f793e94af62 in __GI___assert_fail (assertion=assertion@entry=0x7f793fc4ac9a "end > start", file=file@entry=0x7f793fc4ac81 "libfdisk/src/table.c", line=line@entry=410, function=function@entry=0x7f793fc4b038 <__PRETTY_FUNCTION__.6839> "new_freespace") at assert.c:101
No locals.
#4  0x00007f793fc1e665 in new_freespace (cxt=0x561d3850d190, start=41943007, end=41943006, parent=0x0, pa=0x7ffe74fe3f20) at libfdisk/src/table.c:410
        parent = 0x0
        end = 41943006
        cxt = 0x561d3850d190
        pa = 0x7ffe74fe3f20
        start = 41943007
#5  0x00007f793fc1fabc in fdisk_get_freespaces (cxt=0x561d3850d190, tb=0x7ffe74fe4198) at libfdisk/src/table.c:625
        rc = 0
        nparts = 4
        last = 41943006
        grain = 2048
        parts = 0x561d38572440
        pa = 0x561d3857a680
        itr = {p = 0x561d38572440, head = 0x561d38572440, direction = 0}
#6  0x0000561d36b251f3 in lines_refresh (cf=0x7ffe74fe4190) at disk-utils/cfdisk.c:482
        rc = 0
        p = <optimized out>
        i = <optimized out>
        __PRETTY_FUNCTION__ = "lines_refresh"
#7  0x0000561d36b26bff in main_menu_action (cf=<optimized out>, key=<optimized out>) at disk-utils/cfdisk.c:2390
        n = <optimized out>
        ref = <optimized out>
        rc = <optimized out>
        org_order = 0
        info = 0x0
        warn = 0x0
        pa = <optimized out>
        __PRETTY_FUNCTION__ = "main_menu_action"
#8  0x0000561d36b2142b in ui_run (cf=0x7ffe74fe4190) at disk-utils/cfdisk.c:2520
        key = 13
        rc = 0
#9  main (argc=<optimized out>, argv=<optimized out>) at disk-utils/cfdisk.c:2632
        diskpath = <optimized out>
        rc = <optimized out>
        c = -1
        colormode = <optimized out>
        _cf = {cxt = 0x561d3850d190, table = 0x561d3856a9c0, menu = 0x561d3856b080, fields = 0x561d3856a990, nfields = 6, linesbuf = 0x0, linesbufsz = 0, lines = 0x0, nlines = 0, lines_idx = 4, page_sz = 0, nwrites = 0, act_win = 0x0, mtab = 0x561d3856bfc0, fstab = 0x561d3857b490, mntcache = 0x561d3856b040, wrong_order = 0, zero_start = 0, show_extra = 1}
        cf = 0x7ffe74fe4190
        longopts = {{name = 0x561d36b2ba6f "color", has_arg = 2, flag = 0x0, val = 76}, {name = 0x561d36b2ba75 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x561d36b2ba7a "version", has_arg = 0, flag = 0x0, val = 86}, {name = 0x561d36b2ba82 "zero", has_arg = 0, flag = 0x0, val = 122}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}

Comment 1 Jan Kurik 2016-07-26 04:32:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 2 Karel Zak 2017-01-05 14:26:49 UTC
Seems fixed in v2.29. 

Probably upstream commit 848018183869d908ddfa59ce7362272f65baa860.


Note You need to log in before you can comment on or make changes to this bug.