NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/54913: fexecve(2) panics in chroot(8)



The following reply was made to PR kern/54913; it has been noted by GNATS.

From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%netbsd.org@localhost, Santhosh Raju <fox%netbsd.org@localhost>
Cc: 
Subject: Re: kern/54913: fexecve(2) panics in chroot(8)
Date: Mon, 10 Feb 2020 08:40:33 +0100

 On 01.02.2020 20:30, Christos Zoulas wrote:
 > The following reply was made to PR kern/54913; it has been noted by GNAT=
 S.
 >
 > From: Christos Zoulas <christos%zoulas.com@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc: kern-bug-people%netbsd.org@localhost,
 >  gnats-admin%netbsd.org@localhost,
 >  netbsd-bugs%netbsd.org@localhost
 > Subject: Re: kern/54913: fexecve(2) panics in chroot(8)
 > Date: Sat, 1 Feb 2020 14:28:18 -0500
 >
 >  --Apple-Mail=3D_E61C2FF9-21BC-4346-815D-0A1321C3E030
 >  Content-Transfer-Encoding: quoted-printable
 >  Content-Type: text/plain;
 >  	charset=3Dus-ascii
 >
 >  [2:27pm] 1846#chroot root /bin/sh
 >  # ls
 >  bin       goodbye   hello     lib       t_fexecve usr
 >  dev       h_fexecve hello.c   libexec   tmp
 >  # df
 >  Filesystem  1024-blocks       Used      Avail %Cap Mounted on
 >  /dev             335807     228001      91016  71% /dev
 >  /dev/pts              1          1          0 100% /dev/pts
 >  /bin             335807     228001      91016  71% /bin
 >  /libexec         335807     228001      91016  71% /libexec
 >  /lib             335807     228001      91016  71% /lib
 >  /usr           32880996   26826674    4410274  85% /usr
 >  /dev/sd0h     121987988   92245192   23643398  79% /
 >  # ./t_fexecve fexecve_script
 >  t_fexecve: WARNING: Running test cases without atf-run(1) is unsupporte=
 d
 >  t_fexecve: WARNING: No isolation nor timeout control is being applied; =
 =3D
 >  you may get unexpected failures; see atf-test-case(4)
 >  Executing command [ chmod +x goodbye ]
 >  Executing command [ ./h_fexecve ./goodbye ]
 >  passed
 >  # ./t_fexecve fexecve_elf
 >  t_fexecve: WARNING: Running test cases without atf-run(1) is unsupporte=
 d
 >  t_fexecve: WARNING: No isolation nor timeout control is being applied; =
 =3D
 >  you may get unexpected failures; see atf-test-case(4)
 >  Executing command [ cc -o hello hello.c ]
 >  Executing command [ ./h_fexecve ./hello ]
 >  passed
 >  #
 >
 
 This reproducible for me always.
 
 fox@ also reproduced it (his backtrace):
 
 [ 24695.5921175] panic: kernel diagnostic assertion "rpath !=3D NULL"
 failed: file "/home/source/ab/HEAD/src/sys/kern/kern_exec.c", line 326
 [ 24695.5921175] cpu3: Begin traceback...
 [ 24695.6021339] vpanic() at netbsd:vpanic+0x178
 [ 24695.6021339] kern_assert() at netbsd:kern_assert+0x48
 [ 24695.6021339] check_exec() at netbsd:check_exec+0x4ea
 [ 24695.6021339] exec_script_makecmds() at netbsd:exec_script_makecmds+0x2=
 ee
 [ 24695.6021339] check_exec() at netbsd:check_exec+0x400
 [ 24695.6121372] execve_loadvm() at netbsd:execve_loadvm+0x217
 [ 24695.6121372] execve1() at netbsd:execve1+0x3b
 [ 24695.6121372] sys_fexecve() at netbsd:sys_fexecve+0x23
 [ 24695.6121372] syscall() at netbsd:syscall+0x299
 [ 24695.6121372] --- syscall (number 465) ---
 [ 24695.6221587] 7f6aea5490ea:
 [ 24695.6221587] cpu3: End traceback...
 
 [ 24695.6221587] dumping to dev 19,1 (offset=3D8, size=3D2097055):
 [ 24695.6221587] dump fatal page fault in supervisor mode
 [ 24695.7423287] trap type 6 code 0 rip 0xffffffff80e41627 cs 0x8 rflags
 0x10206 cr2 0xdeadbf17 ilevel 0x6 rsp 0xffff8000ca488d68
 [ 24695.7548153] curlwp 0xffffd7fea1b49bc0 pid 1132.1 lowest kstack
 0xffff8000ca4852c0
 [ 24695.7548153] uvm_fault(0xffffd7fedb377d00, 0xdeadb000, 1) -> e
 [ 24695.7548153] fatal page fault in supervisor mode
 [ 24695.7548153] trap type 6 code 0 rip 0xffffffff80e41627 cs 0x8 rflags
 0x10206 cr2 0xdeadbf17 ilevel 0x8 rsp 0xffff8000c86c0700
 [ 24695.7623580] curlwp 0xffffd7fdb59f44c0 pid 1410.1 lowest kstack
 0xffff8000c86bd2c0
 [ 24695.7623580] Skipping crash dump on recursive panic
 [ 24695.7623580] panic: trap
 [ 24695.7623580] cpu3: Begin traceback...
 [ 24695.7623580] vpanic() at netbsd:vpanic+0x178
 [ 24695.7623580] snprintf() at netbsd:snprintf
 [ 24695.7724160] startlwp() at netbsd:startlwp
 [ 24695.7724160] alltraps() at netbsd:alltraps+0xc3
 [ 24695.7724160] ld_virtio_dump() at netbsd:ld_virtio_dump+0x37b
 [ 24695.7724160] dk_dump() at netbsd:dk_dump+0x166
 [ 24695.7824117] dump_header_flush() at netbsd:dump_header_flush+0x6d
 [ 24695.7824117] dump_header_addbytes() at netbsd:dump_header_addbytes+0x4=
 0
 [ 24695.7824117] dump_header_addseg() at netbsd:dump_header_addseg+0x1e
 [ 24695.7824117] dump_seg_iter() at netbsd:dump_seg_iter+0x112
 [ 24695.7824117] cpu_dump() at netbsd:cpu_dump+0x6a
 [ 24695.7924111] dodumpsys() at netbsd:dodumpsys+0x100
 [ 24695.7924111] dumpsys() at netbsd:dumpsys+0x1d
 [ 24695.7924111] sys_reboot() at netbsd:sys_reboot
 [ 24695.7924111] vpanic() at netbsd:vpanic+0x181
 [ 24695.7924111] kern_assert() at netbsd:kern_assert+0x48
 [ 24695.8024165] check_exec() at netbsd:check_exec+0x4ea
 [ 24695.8024165] exec_script_makecmds() at netbsd:exec_script_makecmds+0x2=
 ee
 [ 24695.8024165] check_exec() at netbsd:check_exec+0x400
 [ 24695.8024165] execve_loadvm() at netbsd:execve_loadvm+0x217
 [ 24695.8024165] execve1() at netbsd:execve1+0x3b
 [ 24695.8124121] sys_fexecve() at netbsd:sys_fexecve+0x23
 [ 24695.8124121] syscall() at netbsd:syscall+0x299
 [ 24695.8124121] --- syscall (number 465) ---
 [ 24695.8124121] 7f6aea5490ea:
 [ 24695.8124121] cpu3: End traceback...
 [ 24695.8124121] rebooting...
 
 
 Steps:
 
 mount -t null /dev /path/to/destdir/dev
 mount -t null /dev/pts /path/to/destdir/dev/pts
 mount -t null /tmp /path/to/destdir/tmp
 chroot /path/to/destdir/
 cd /usr/tests/kernel
 atf-run t_fexecve
 


Home | Main Index | Thread Index | Old Index