Bug 237458 - lib.libc.sys.sendfile_test on i386 fails sometimes calling sysctlbyname with ENOMEM
Summary: lib.libc.sys.sendfile_test on i386 fails sometimes calling sysctlbyname with ...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: CURRENT
Hardware: i386 Any
: Normal Affects Some People
Assignee: Enji Cooper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-22 04:19 UTC by Enji Cooper
Modified: 2019-04-29 19:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2019-04-22 04:19:01 UTC
I'm not sure why, but i386 has an issue that occurs semi-regularly where it's not able to run sysctlbyname cleanly, failing with ENOMEM. From https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/lastCompletedBuild/testReport/lib.libc.sys/sendfile_test/hdtr_negative_bad_pointers_v4/:

/usr/src/lib/libc/tests/sys/sendfile_test.c:66: sysctlbyname(oidname, &int_value, &oldlen, NULL, 0) != 0: sysctlbyname(net.inet.ip.portrange.first, ...) failed: Cannot allocate memory

This issue has been seen on ^/stable/11 and ^/stable/12 with i386, but not ^/head AFAICT.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-04-22 11:10:14 UTC
A commit references this bug:

Author: ngie
Date: Mon Apr 22 11:09:24 UTC 2019
New revision: 346539
URL: https://svnweb.freebsd.org/changeset/base/346539

Log:
  Fix `get_int_via_sysctlbyname(..)` on Jenkins

  Initialize `oldlen` to the size of the value, instead of leaving the value
  unitialized. Leaving it unitialized seems to work by accident on amd64 when
  running 64-bit programs, but not on i386.

  This matches patterns in use in other programs.

  PR:		237458
  Approved by:	emaste (mentor; implicit)
  MFC after:	1 week
  Tested on:	^/head (amd64), ^/stable/11 (i386)

Changes:
  head/lib/libc/tests/sys/sendfile_test.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-04-29 19:12:46 UTC
A commit references this bug:

Author: ngie
Date: Mon Apr 29 19:11:56 UTC 2019
New revision: 346911
URL: https://svnweb.freebsd.org/changeset/base/346911

Log:
  MFC r346539:

  Fix `get_int_via_sysctlbyname(..)` on Jenkins

  Initialize `oldlen` to the size of the value, instead of leaving the value
  unitialized. Leaving it unitialized seems to work by accident on amd64 when
  running 64-bit programs, but not on i386.

  This matches patterns in use in other programs.

  PR:		237458
  Tested on:	^/head (amd64), ^/stable/11 (i386)

Changes:
_U  stable/11/
  stable/11/lib/libc/tests/sys/sendfile_test.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-29 19:13:49 UTC
A commit references this bug:

Author: ngie
Date: Mon Apr 29 19:12:48 UTC 2019
New revision: 346912
URL: https://svnweb.freebsd.org/changeset/base/346912

Log:
  MFC r346539:

  Fix `get_int_via_sysctlbyname(..)` on Jenkins

  Initialize `oldlen` to the size of the value, instead of leaving the value
  unitialized. Leaving it unitialized seems to work by accident on amd64 when
  running 64-bit programs, but not on i386.

  This matches patterns in use in other programs.

  PR:		237458
  Tested on:	^/head (amd64), ^/stable/11 (i386)

Changes:
_U  stable/12/
  stable/12/lib/libc/tests/sys/sendfile_test.c