Bug#430636: tar segfaulting within cowbuilder chroot
Hi, open(/.ilist, O_RDONLY) = 5 fstat(5, {st_mode=S_IFREG|0644, st_size=180128, ...}) = 0 mmap(NULL, 180128, PROT_READ, MAP_PRIVATE, 5, 0) = 0x2aeb80b29000 sched_yield() = 0 clock_gettime(CLOCK_REALTIME, {1182845741, 246584738}) = 0 fcntl(0, F_GETFD) = 0 fcntl(1, F_GETFD) = 0 fcntl(2, F_GETFD) = 0 getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0 close(1023) = -1 EBADF (Bad file descriptor) close(1022) = -1 EBADF (Bad file descriptor) close(1021) = -1 EBADF (Bad file descriptor) close(1020) = -1 EBADF (Bad file descriptor) . . . close(6)= -1 EBADF (Bad file descriptor) close(5)= 0 close(4)= 0 close(3)= 0 rt_sigaction(SIGCHLD, {SIG_DFL}, {SIG_DFL}, 8) = 0 geteuid() = 0 umask(0)= 022 pipe([3, 4])= 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2aeb80b27b90) = 8519 close(4)= 0 fstat(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0 read(3, ./\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..., 10240) = 10240 --- SIGCHLD (Child exited) @ 0 (0) --- Hmm who's doing this ? regards, junichi -- [EMAIL PROTECTED],netfort.gr.jp} Debian Project -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#430636: tar segfaulting within cowbuilder chroot
At Wed, 27 Jun 2007 06:15:56 +0900, Junichi Uekawa wrote: Hi, close(1023) = -1 EBADF (Bad file descriptor) close(1022) = -1 EBADF (Bad file descriptor) close(1021) = -1 EBADF (Bad file descriptor) close(1020) = -1 EBADF (Bad file descriptor) . . . close(6)= -1 EBADF (Bad file descriptor) close(5)= 0 close(4)= 0 close(3)= 0 Hmm who's doing this ? Looking at source, tar calls 'closeopen', which does exactly this. According to ChangeLog, it was probably changed for 1.16. Looking at http://packages.qa.debian.org/t/tar.html, it was released October 2006. I wonder why it didn't break before. Hmmm.. mmap shouldn't break with fds being closed randomly. On the other hand, people randomly writing to the fd might be bad. I'll try with closing file descriptor for a change. I suspect the following code as well, but my test code seems to work fine. sys_exec_info_script (const char **archive_name, int volume_number) xclose (p[PREAD]); xdup2 (p[PWRITE], 3); argv[0] = /bin/sh; argv[1] = -c; argv[2] = (char*) info_script_option; argv[3] = NULL; execv (argv[0], argv); exec_fatal (info_script_option); } 2005-12-07 Sergey Poznyakoff [EMAIL PROTECTED] * src/common.h (sys_exec_info_script): Update declaration (restrict_option): New global * src/system.c (sys_exec_info_script): The script can supply new archive name to use by writing it to file descriptor 3. regards, junichi -- [EMAIL PROTECTED],netfort.gr.jp} Debian Project -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#430636: tar segfaulting within cowbuilder chroot
Hi, close(1023) = -1 EBADF (Bad file descriptor) close(1022) = -1 EBADF (Bad file descriptor) close(1021) = -1 EBADF (Bad file descriptor) close(1020) = -1 EBADF (Bad file descriptor) . . . close(6)= -1 EBADF (Bad file descriptor) close(5)= 0 close(4)= 0 close(3)= 0 Hmm who's doing this ? Looking at source, tar calls 'closeopen', which does exactly this. According to ChangeLog, it was probably changed for 1.16. Looking at http://packages.qa.debian.org/t/tar.html, it was released October 2006. I wonder why it didn't break before. regards, junichi -- [EMAIL PROTECTED],netfort.gr.jp} Debian Project -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]