Activity log for bug #1861776

Date Who What changed Old value New value Message
2020-02-04 08:06:30 Konstantin bug added bug
2020-02-05 08:27:30 Konstantin description When fseek is called, it calls in turn 1. lseek(), and 2. read(). In glibc 2.30 (maybe earlier) read() is only called for the last block. However in glibc 2.27 Ubuntu 18.04 is using, the read happens over the whole skipped range, which may cause a hang of an app that tries to skip too big range. There's is a related report: https://sourceware.org/bugzilla/show_bug.cgi?id=25497 Note, per comments, in at least glibc 2.30 read() only happens for the *last block*. This means there was some fix for fseek() to not read over everything it skipped, which Ubuntu didn't backport to older glibc it's using. # Steps to reproduce In command below, replace `/dev/sda` if necessary with a device that is at least 2 GB in size. Run `sudo hexdump -C /dev/sda -s 0x80000000 -n 1`. This command uses `hexdump` to print content of a disk at a large offset. ## Expected The command returns immediately with a print ## Actual The command hangs with high CPU load. If you use `strace hexdump …`, you'll see there a bunch of reads happens. These reads arise from glibc 2.27 implementation of `fseek()`. When fseek is called, it calls in turn 1. lseek(), and 2. read(). In glibc 2.29 (maybe earlier) read() is only called for the last block. However in glibc 2.27 Ubuntu 18.04 is using, the read happens over the whole skipped range, which may cause a hang of an app that tries to skip too big range. There's is a related report: https://sourceware.org/bugzilla/show_bug.cgi?id=25497 Note, per comments, in at least glibc 2.29 read() only happens for the *last block*. This means there was some fix for fseek() to not read over everything it skipped, which Ubuntu didn't backport to older glibc it's using. # Steps to reproduce In command below, replace `/dev/sda` if necessary with a device that is at least 2 GB in size. Run `sudo hexdump -C /dev/sda -s 0x80000000 -n 1`. This command uses `hexdump` to print content of a disk at a large offset. ## Expected The command returns immediately with a print ## Actual The command hangs with high CPU load. If you use `strace hexdump …`, you'll see there a bunch of reads happens. These reads arise from glibc 2.27 implementation of `fseek()`.
2020-12-07 20:04:42 Balint Reczey nominated for series Ubuntu Focal
2020-12-07 20:04:42 Balint Reczey bug task added glibc (Ubuntu Focal)
2020-12-07 20:04:42 Balint Reczey nominated for series Ubuntu Bionic
2020-12-07 20:04:42 Balint Reczey bug task added glibc (Ubuntu Bionic)
2020-12-07 20:04:54 Balint Reczey glibc (Ubuntu): status New Fix Released
2020-12-07 20:04:59 Balint Reczey glibc (Ubuntu Focal): status New Fix Released
2020-12-07 20:05:21 Balint Reczey glibc (Ubuntu Bionic): importance Undecided Low
2020-12-07 20:06:55 Balint Reczey bug watch added https://sourceware.org/bugzilla/show_bug.cgi?id=25497
2020-12-07 20:06:55 Balint Reczey bug task added glibc
2020-12-08 03:17:29 Bug Watch Updater glibc: status Unknown New
2020-12-08 03:17:29 Bug Watch Updater glibc: importance Unknown Medium