Bug 195617

Summary: autobreak stuffs are not called before configure ---> no SCHED_FIFO etc
Product: [Fedora] Fedora Reporter: Sami Farin <hvtaifwkbgefbaei>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideKeywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-29 13:54:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Do it the cruel way: define HAVE_MLOCKALL and include sys/mman.h none

Description Sami Farin 2006-06-15 22:02:24 UTC
Description of problem:
ntpd/ntpd.c uses HAVE_MLOCKALL etc to figure out if
mlockall should be used, but from looking at ntpd changelog,
mlockall was disabled on Linux 

ChangeSet
  1.1251 04/11/03 01:51:42 stenn.edu +1 -0
  Disable mlockall() under linux for now - resolver problems.

that's obvious bs, since mlockall works.  (what resolver problems?)
now I have /proc/x/stats for ntpd: VmLck:      3000 kB
(earlier 0 kB)

also, sched_setscheduler is not available.

these missing features are important for the operation of ntpd.

Version-Release number of selected component (if applicable):
4.2.2-1

How reproducible:
always

Steps to Reproduce:
1. rpmbuild --rebuild ntp-4.2.2-1.src.rpm
2.
3.
  
Actual results:
config.h has default values of no use

Expected results:
having support for mlockall and sched_setscheduler etc after ./configure

Additional info:
I'd guess calling aclocal automake autoconf before configure
would help a bit, but I leave figuring out autobreak stuffs to the maintainer.

Ohh, and mlockall has to be fixed in another way.
I added
#define HAVE_MLOCKALL
and
#include <sys/mman.h>                                                          
               
into ntpd.c ;-)

Comment 1 Miroslav Lichvar 2006-06-16 11:27:03 UTC
Ok, thanks. The mlockall() call will be enabled in ntp-4.2.2-3.

But I didn't found anything wrong with the sched_setscheduler, strace ntpd -N shows:
  sched_setscheduler(0, SCHED_FIFO, { 99 }) = 0

Can you provide more info?

Comment 2 Sami Farin 2006-06-16 13:16:23 UTC
strace showed sched_setscheduler was not being called.
This happened because I wasn't using -N option ;-O

HAVE_SCHED_SETSCHEDULER is defined in config.h, after all... without calling
automake etc.


Comment 3 Miroslav Lichvar 2006-07-06 15:25:49 UTC
Fixed in ntp-4.2.2-3.

Comment 4 Sami Farin 2007-01-24 23:02:15 UTC
Broken in 4.2.4-1, 4.2.4-3.
No mlockall.


Comment 5 Sami Farin 2007-01-24 23:08:30 UTC
Created attachment 146470 [details]
Do it the cruel way: define HAVE_MLOCKALL and include sys/mman.h

Comment 6 Miroslav Lichvar 2007-01-25 08:32:33 UTC
Since ntp-4.2.4 mlocking shouldn't be needed as ntpd uses SO_TIMESTAMP option
for sockets.

Or is there another reason why you need memory locked?

Comment 7 Sami Farin 2007-01-25 12:53:51 UTC
Yes, refclock.


Comment 8 Miroslav Lichvar 2007-01-25 15:25:47 UTC
Ok. Majority of users don't need the locking, so I will probably add an option
to ntpd that will enable mlockall(). Will this solution be ok for you?

Comment 9 Sami Farin 2007-01-25 15:34:33 UTC
Fine with me.


Comment 10 Miroslav Lichvar 2007-01-29 13:54:42 UTC
Ok, ntpd in package ntp-4.2.4-4.fc7 has new option -m to enable memory locking.