NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/57952 (dhcpcd(8) inexplicably terminated in the night)
The following reply was made to PR bin/57952; it has been noted by GNATS.
From: Christos Zoulas <christos%zoulas.com@localhost>
To: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Cc: Roy Marples <roy%marples.name@localhost>,
"gnats-bugs%netbsd.org@localhost" <gnats-bugs%NetBSD.org@localhost>,
Martin Husemann <martin%duskware.de@localhost>,
"gnats-admin%netbsd.org@localhost" <gnats-admin%NetBSD.org@localhost>,
"netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%NetBSD.org@localhost>
Subject: Re: bin/57952 (dhcpcd(8) inexplicably terminated in the night)
Date: Fri, 23 Feb 2024 19:50:16 -0500
if (USPACE + ctob(vm->vm_dsize + vm->vm_ssize) >=3D
p->p_rlimit[RLIMIT_CORE].rlim_cur) {
error =3D EFBIG; /* better error code? */
goto release;
}
Looks like the core resource limit is 0?
christos
> On Feb 23, 2024, at 7:48=E2=80=AFPM, Taylor R Campbell =
<riastradh%NetBSD.org@localhost> wrote:
>=20
>> Date: Fri, 23 Feb 2024 23:29:05 +0000
>> From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
>>=20
>> So I infer that the network proxy must have crashed, in my original
>> case. But I don't see how to trigger a core dump.
>=20
> Just in case somehow there's set-user/group-id processes involved, I
> also tried:
>=20
> 1. make /var/chroot/dhcpcd/var/crash owned by _dhcpcd:_dhcpcd
> 2. add `kern.coredump.setid.dump=3D1' to /etc/modules.conf
> 3. reboot
> 4. kill -ABRT manager
>=20
> I got a zero-length core file and a console message;
>=20
> [ 1251.6878114] pid 6079 (dhcpcd): system write of =
64@0xffffc000b03a79c0 at 0 failed: 27
>=20
> I tried unlimiting the file size with
>=20
> # sysctl -w proc.$pid.rlimit.filesize.hard=3Dunlimited
> # sysctl -w proc.$pid.rlimit.filesize.soft=3Dunlimited
>=20
> and this time, kill -ABRT manager produced a core dump at
> /var/chroot/dhcpcd/var/crash/dhcpcd.core!
>=20
> So there's several issues:
>=20
> 1. dhcpcd somehow gets the kern.coredump.setid treatment (which I
> thought was reserved for executables having the set-user/group-id
> bit set, and I don't see any evidence of that in dhcpcd)
>=20
> 2. /var/crash doesn't exist under the chroot, /var/chroot/dhcpcd
>=20
> 3. the filesize rlimit prevents the core dump too
Home |
Main Index |
Thread Index |
Old Index