dd segv's unless status=noxfer flag used

Bug #59624 reported by Red Igloo
6
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: coreutils

# dpkg -s coreutils
Package: coreutils
Essential: yes
Status: install ok installed
Priority: required
Section: utils
Installed-Size: 8228
Maintainer: Michael Stone <email address hidden>
Architecture: i386
Version: 5.93-5ubuntu4

# ls -l /tmp/index ; strace dd if=/tmp/index of=/tmp/index1 bs=10k ; ls -l /tmp/index1 ; cmp -l /tmp/index /tmp/index1
-rw-r--r-- 1 jc jc 10240 2006-09-09 10:11 /tmp/index
execve("/bin/dd", ["dd", "if=/tmp/index", "of=/tmp/index1", "bs=10k"], [/* 34 vars */]) = 0
uname({sys="Linux", node="icebox", ...}) = 0
brk(0) = 0x8052000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f14000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f13000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f12000
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=46187, ...}) = 0
old_mmap(NULL, 46187, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f06000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\36\0"..., 512) = 512fstat64(3, {st_mode=S_IFREG|0644, st_size=28116, ...}) = 0
old_mmap(NULL, 30888, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7efe000
old_mmap(0xb7f05000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0xb7f05000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\220O\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1232784, ...}) = 0
old_mmap(NULL, 1238972, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7dcf000
old_mmap(0xb7ef4000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x125000) = 0xb7ef4000
old_mmap(0xb7efb000, 10172, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7efb000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`H\0\000"..., 512) = 512fstat64(3, {st_mode=S_IFREG|0755, st_size=86580, ...}) = 0
old_mmap(NULL, 71064, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7dbd000
old_mmap(0xb7dcc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0xb7dcc000
old_mmap(0xb7dcd000, 5528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7dcd000
close(3) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7dbc000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7dbc8e0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7f06000, 46187) = 0
set_tid_address(0xb7dbc928) = 3565
rt_sigaction(SIGRTMIN, {0xb7dc13b0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7dc1430, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
_sysctl({{CTL_KERN, KERN_VERSION, 0, 20ac9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 2, 0xbfd286fc, 38, (nil), 0}) = 0
brk(0) = 0x8052000
brk(0x8073000) = 0x8073000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f11000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2586
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7f11000, 4096) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_IDENTIFICATION", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=366, ...}) = 0
mmap2(NULL, 366, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f11000
close(3) = 0
open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gconv/gconv-modules", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=45568, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f10000
read(3, "# GNU libc iconv configuration.\n"..., 4096) = 4096
read(3, "lias\tJS//\t\t\tJUS_I.B1.002//\nalias"..., 4096) = 4096
read(3, "ule\tINTERNAL\t\tISO-8859-3//\t\tISO8"..., 4096) = 4096
read(3, "lias\tISO-IR-199//\t\tISO-8859-14//"..., 4096) = 4096
read(3, "\t\tto\t\t\tmodule\t\tcost\nalias\tCSEBCD"..., 4096) = 4096
read(3, "ule\t\tcost\nalias\tCP284//\t\t\tIBM284"..., 4096) = 4096
read(3, "lias\tCP864//\t\t\tIBM864//\nalias\t86"..., 4096) = 4096
read(3, "module\tIBM937//\t\tINTERNAL\t\tIBM93"..., 4096) = 4096
read(3, "\tEUC-JP//\nalias\tUJIS//\t\t\tEUC-JP/"..., 4096) = 4096
read(3, "module\t\tcost\nalias\tISO-IR-143//\t"..., 4096) = 4096
read(3, "-BOX//\nmodule\tISO_10367-BOX//\t\tI"..., 4096) = 4096
read(3, "module\tINTERNAL\t\tEUC-JISX0213//\t"..., 4096) = 512
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7f10000, 4096) = 0
futex(0xb7efac4c, FUTEX_WAKE, 2147483647) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_MEASUREMENT", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_MEASUREMENT", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=23, ...}) = 0
mmap2(NULL, 23, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f10000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_TELEPHONE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_TELEPHONE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
mmap2(NULL, 56, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0f000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_ADDRESS", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_ADDRESS", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0
mmap2(NULL, 127, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0e000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_NAME", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_NAME", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=62, ...}) = 0
mmap2(NULL, 62, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0d000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_PAPER", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_PAPER", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34, ...}) = 0
mmap2(NULL, 34, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0c000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_MESSAGES", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
close(3) = 0
open("/usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=52, ...}) = 0
mmap2(NULL, 52, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0b000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_MONETARY", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_MONETARY", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=290, ...}) = 0
mmap2(NULL, 290, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f0a000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_COLLATE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_COLLATE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=880086, ...}) = 0
mmap2(NULL, 880086, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ce5000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_TIME", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_TIME", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2451, ...}) = 0
mmap2(NULL, 2451, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f09000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_NUMERIC", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_NUMERIC", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=54, ...}) = 0
mmap2(NULL, 54, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f08000
close(3) = 0
open("/usr/lib/locale/en_GB.UTF-8/LC_CTYPE", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.utf8/LC_CTYPE", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=208464, ...}) = 0
mmap2(NULL, 208464, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7cb2000
close(3) = 0
close(0) = 0
open("/tmp/index", O_RDONLY|O_LARGEFILE) = 0
_llseek(0, 0, [0], SEEK_CUR) = 0
close(1) = 0
open("/tmp/index1", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 1
rt_sigaction(SIGUSR1, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR1, {0x8049a2c, [INT USR1], 0}, NULL, 8) = 0
rt_sigaction(SIGINT, {0x8049a1f, [INT USR1], SA_NOMASK|SA_ONESHOT}, NULL, 8) = 0clock_gettime(CLOCK_MONOTONIC, {2887952, 448314263}) = 0
read(0, "Tape label for Sat Sep 9 01:26:"..., 10240) = 10240
write(1, "Tape label for Sat Sep 9 01:26:"..., 10240) = 10240
read(0, "", 10240) = 0
close(0) = 0
close(1) = 0
clock_gettime(CLOCK_MONOTONIC, {2887952, 455279263}) = 0
open("/usr/share/locale/en_GB/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB/LC_MESSAGES/coreutils.mo", O_RDONLY) = 0
fstat64(0, {st_mode=S_IFREG|0644, st_size=239094, ...}) = 0
mmap2(NULL, 239094, PROT_READ, MAP_PRIVATE, 0, 0) = 0xb7c77000
close(0) = 0
open("/usr/share/locale-langpack/en/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/coreutils.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "1+0 records in\n1+0 records out\n", 311+0 records in
1+0 records out
) = 31
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
-rw-r--r-- 1 root root 10240 2006-09-09 10:47 /tmp/index1
# env | grep LANG
LANG=en_GB.UTF-8
LANGUAGE=en_GB:en_US:en_GB:en

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Thanks for reporting this. Can you please get a backtrace with debug symbols? http://wiki.ubuntu.com/DebuggingProgramCrash describes how this can be done.

Changed in coreutils:
importance: Untriaged → Medium
status: Unconfirmed → Needs Info
Revision history for this message
Kyzer (stuart-caie) wrote :

I can confirm this bug.

(gdb) run if=/dev/hdc of=/tmp.dvd.iso bs=2048 conv=noerror,sync,fsync,fdatasync
Starting program: /tmp/coreutils-5.93/coreutils-5.93/src/dd if=/dev/hdc of=/tmp/dvd.iso bs=2048 conv=noerror,sync,fsync,fdatasync
[Thread debugging using libthread_db enabled]
[New Thread -1209678144 (LWP 7728)]
[Switching to Thread -1209678144 (LWP 7728)]

/tmp/coreutils-5.93/coreutils-5.93/src/dd: reading `/dev/hdc': Input/output error
445462+0 records in
445462+0 records out

Program received signal SIGSEGV, Segmentation fault.
0xb7eda2a3 in strlen () from /lib/tls/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7eda2a3 in strlen () from /lib/tls/i686/cmov/libc.so.6
#1 0xb7eae2e4 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7eaad7c in cuserid () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7eaafbb in vfprintf () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7eb36af in fprintf () from /lib/tls/i686/cmov/libc.so.6
#5 0x080497b2 in print_stats () at dd.c:553
#6 0x0804ac14 in dd_copy () at dd.c:1435
#7 0x0804b3ee in main (argc=5, argv=0xbfbcedc4) at dd.c:1691
(gdb)

Also see Jon Grant's mail to bug-coreutils.
http://<email address hidden>/msg07689.html

He's also using Ubuntu, coreutils 5.97 and gets exactly the same dd bug.

Changed in coreutils:
status: Needs Info → Confirmed
Revision history for this message
Rob David (rob-david) wrote :

This bug-coreutils thread is also relevant. It suggests a version mismatch between coreutils and gettext.

http://<email address hidden>/msg07807.html

Revision history for this message
Martin Emrich (emme) wrote :

Running dd with LANG=C seems to be a workaround here.

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Thanks for the bug report. This particular bug has already been
reported into our bug tracking system, but please feel free to report
any further bugs which you find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.