View Issue Details

IDProjectCategoryView StatusLast Update
0000805LDMud 3.5Efunspublic2018-01-29 22:25
ReporterSorcerer Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
Summary0000805: rusage() returns fixed (negative) values
DescriptionIn UNItopia, rusage() returns for utime -621739903 and for stime -2062284293 for all calls to rusage(). Since its negative values, I assume some counter variable to have overflowed. Other values returned by rusage still change (so it is obviously still refreshing its values). Our current uptime is close to 350 days.
TagsNo tags attached.
Attached Files
machine.h (13,793 bytes)   
/* machine.h.  Generated from machine.h.in by configure.  */
/* machine.h.in.  Generated from configure.in by autoheader.  */


#ifndef MACHINE_H
#define MACHINE_H

/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* A mask that allows to extract an unsigned char from a signed */
#define CHARBIT_MASK 0xff

/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
   systems. This function is required for `alloca.c' support on those systems.
   */
/* #undef CRAY_STACKSEG_END */

/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */

/* define the erq include file. */
#define ERQ_INCLUDE "util/xerq/erq.h"

/* The following is needed for smalloc without MALLOC_REPLACABLE to use memory
   efficiently. smalloc will malloc blocks that are a large power of two,
   minus EXTERN_MALLOC_OVERHEAD. If you have no idea what number to choose,
   compile & run util/overhead.c */
#define EXTERN_MALLOC_OVERHEAD 8

/* does free() have void as its returntype? */
#define FREE_RETURNS_VOID 1

/* If so, is it restricted to user and system time? */
/* #undef GETRUSAGE_RESTRICTED */

/* Is it available as a subfunction of syscall()? */
/* #undef GETRUSAGE_VIA_SYSCALL */

/* Does the machine offer libgcrypt? */
#define HAS_GCRYPT 1

/* Does the machine offer GnuTLS? */
#define HAS_GNUTLS 1

/* version of GNUTLS library */
#define HAS_GNUTLS_VERSION 8

/* Does the machine offer iconv? */
#define HAS_ICONV 1

/* Does the machine's iconv take a non-const 'char**' as first arg? */
#define HAS_ICONV_NONCONST_IN 1

/* Does the machine offer IDNA? */
/* #undef HAS_IDN */

/* Does the machine have Iksemel? */
/* #undef HAS_IKSEMEL */

/* Does the compiler provide inline functions? */
#define HAS_INLINE 1

/* Does the machine offer IPv6? */
#define HAS_IPV6 1

/* Does the machine offer JSON? */
/* #undef HAS_JSON */

/* Does the machine offer mySQL? */
/* #undef HAS_MYSQL */

/* Does the machine offer OpenSSL/SSL? */
/* #undef HAS_OPENSSL */

/* Does the machine offer PCRE? */
#define HAS_PCRE 1

/* Does the machine offer PostgreSQL? */
/* #undef HAS_PGSQL */

/* Does the machine offer SQLite3? */
#define HAS_SQLITE3 1

/* Does the machine have libxml2? */
#define HAS_XML2 1

/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1

/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1

/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
   */
#define HAVE_ALLOCA_H 1

/* Define to 1 if you have the <bstring.h> header file. */
/* #undef HAVE_BSTRING_H */

/* Define to 1 if you have the `crypt' function. */
#define HAVE_CRYPT 1

/* Define to 1 if you have the <crypt.h> header file. */
#define HAVE_CRYPT_H 1

/* Define to 1 if C supports variable-length arrays. */
#define HAVE_C_VARARRAYS 1

/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
   */
#define HAVE_DIRENT_H 1

/* Define to 1 if you have the `fchmod' function. */
#define HAVE_FCHMOD 1

/* Define to 1 if you have the `fcntl' function. */
#define HAVE_FCNTL 1

/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1

/* Define to 1 if you have the `getdomainname' function. */
#define HAVE_GETDOMAINNAME 1

/* Define to 1 if you have the `getpagesize' function. */
#define HAVE_GETPAGESIZE 1

/* Does the system have a getrusage call? */
#define HAVE_GETRUSAGE 1

/* Define to 1 if you have the `gettimeofday' function. */
#define HAVE_GETTIMEOFDAY 1

/* Define to 1 if the system has the type `intmax_t'. */
#define HAVE_INTMAX_T 1

/* Define to 1 if the system has the type `intptr_t'. */
#define HAVE_INTPTR_T 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <libc.h> header file. */
/* #undef HAVE_LIBC_H */

/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1

/* Define to 1 if you have the `nsl' library (-lnsl). */
#define HAVE_LIBNSL 1

/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */

/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define to 1 if the system has the type `long double'. */
#define HAVE_LONG_DOUBLE 1

/* Define to 1 if the type `long double' works and has more range or precision
   than `double'. */
#define HAVE_LONG_DOUBLE_WIDER 1

/* Define to 1 if the system has the type `long long int'. */
#define HAVE_LONG_LONG_INT 1

/* Define to 1 if you have the `memmem' function. */
#define HAVE_MEMMEM 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `mmap' function. */
#define HAVE_MMAP 1

/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */

/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1

/* Define to 1 if you have the `poll' function. */
#define HAVE_POLL 1

/* Define to 1 if stdbool.h conforms to C99. */
#define HAVE_STDBOOL_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if cpp supports the ANSI # stringizing operator. */
#define HAVE_STRINGIZE 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `sysconf' function. */
#define HAVE_SYSCONF 1

/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_SYS_DIR_H */

/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
   */
/* #undef HAVE_SYS_NDIR_H */

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/rusage.h> header file. */
/* #undef HAVE_SYS_RUSAGE_H */

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/termios.h> header file. */
#define HAVE_SYS_TERMIOS_H 1

/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the `trunc' function. */
/* #undef HAVE_TRUNC */

/* Define to 1 if typeof works with your compiler. */
#define HAVE_TYPEOF 1

/* Define to 1 if the system has the type `uintmax_t'. */
#define HAVE_UINTMAX_T 1

/* Define to 1 if the system has the type `uintptr_t'. */
#define HAVE_UINTPTR_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if the system has the type `unsigned long long int'. */
#define HAVE_UNSIGNED_LONG_LONG_INT 1

/* Define to 1 if you have the `wait3' function. */
#define HAVE_WAIT3 1

/* Define to 1 if you have the `waitpid' function. */
#define HAVE_WAITPID 1

/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1

/* Define to 1 if you have the `_crypt' function. */
/* #undef HAVE__CRYPT */

/* Is the library function inet_ntoa() compatible with the compiler? */
#define INET_NTOA_OK 1

/* JSON-C supports 64 bit values. */
/* #undef JSON_64_SUPPORT */

/* Defined if we can replace malloc. */
#define MALLOC_REPLACEABLE 1

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* what kind of pointer is used by malloc() et al */
#define POINTER void *

/* Can rename handle directories? */
#define RENAME_HANDLES_DIRECTORIES 1

/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void

/* Set in response to the signal handler return type, since not all compilers
   understand direct definition comparisons. */
#define RETSIGTYPE_VOID 1

/* Can ru_utime / ru_stime be accessed as a timeval with tv_sec and tv_usec?
   */
#define RUSAGE_USEC 1

/* Defined if sbrk() is working */
#define SBRK_OK 1

/* The size of `char *', as computed by sizeof. */
#define SIZEOF_CHAR_P 8

/* The size of `double', as computed by sizeof. */
#define SIZEOF_DOUBLE 8

/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of `intmax_t', as computed by sizeof. */
#define SIZEOF_INTMAX_T 8

/* The size of `intptr_t', as computed by sizeof. */
#define SIZEOF_INTPTR_T 8

/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8

/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8

/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2

/* Does SQLite3 use pthreads? */
/* #undef SQLITE3_USES_PTHREADS */

/* If using the C implementation of alloca, define if you know the
   direction of stack growth for your system; otherwise it will be
   automatically deduced at runtime.
	STACK_DIRECTION > 0 => grows toward higher addresses
	STACK_DIRECTION < 0 => grows toward lower addresses
	STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* nonblocking using fcntl with FNDELAY */
#define USE_FCNTL_FNDELAY 1

/* nonblocking using fcntl with O_NDELAY */
#define USE_FCNTL_O_NDELAY 1

/* Can F_SETOWN be used on a socket? */
#define USE_FCNTL_SETOWN 1

/* How to set a socket non-blocking */
#define USE_IOCTL_FIONBIO 1

/* Can SO_OOBINLINE be used on a socket? */
#define USE_OOBINLINE 1

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
   significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
#  define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* #  undef WORDS_BIGENDIAN */
# endif
#endif

/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT32_T */

/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT64_T */

/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT8_T */

/* Define to `__inline__' or `__inline' if that's what the C compiler
   calls it, or to nothing if 'inline' is not supported under any name.  */
#ifndef __cplusplus
/* #undef inline */
#endif

/* Define to the type of a signed integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int16_t */

/* Define to the type of a signed integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int32_t */

/* Define to the type of a signed integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int64_t */

/* Define to the type of a signed integer type of width exactly 8 bits if such
   a type exists and the standard includes do not define it. */
/* #undef int8_t */

/* Define to the widest signed integer type if <stdint.h> and <inttypes.h> do
   not define. */
/* #undef intmax_t */

/* Define to the type of a signed integer type wide enough to hold a pointer,
   if such a type exists, and if the system does not define it. */
/* #undef intptr_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef mode_t */

/* Define to `long int' if <sys/types.h> does not define. */
/* #undef off_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */

/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

/* Define to `int' if <sys/types.h> does not define. */
/* #undef ssize_t */

/* Define to __typeof__ if your compiler spells it that way. */
/* #undef typeof */

/* Define to the type of an unsigned integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint16_t */

/* Define to the type of an unsigned integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint32_t */

/* Define to the type of an unsigned integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint64_t */

/* Define to the type of an unsigned integer type of width exactly 8 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint8_t */

/* Define to the widest unsigned integer type if <stdint.h> and <inttypes.h>
   do not define. */
/* #undef uintmax_t */

/* Define to the type of an unsigned integer type wide enough to hold a
   pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */

/* Define to empty if the keyword `volatile' does not work. Warning: valid
   code using `volatile' can become incorrect without. Disable with care. */
/* #undef volatile */


#endif
machine.h (13,793 bytes)   

Activities

zesstra

2012-07-11 22:22

administrator   ~0002141

Mhmm, could be. AFAIR the result is in milliseconds. So if your user and system time for the process is larger than 24 days...
The good question is how to change it - changing the array is quite annoying. :-(

Sorcerer

2012-07-13 15:32

updater   ~0002148

I think, having kind of a wrap-around to 0 would be the easy way. If the max. value is reached, simply reset the counter to zero. In most cases, it is rather the difference between two calls that is of interest than the absolute values.

zesstra

2012-12-04 21:39

administrator   ~0002161

On a second thought: I could believe that these properties flowed over, but that does not explain, why they don't change anymore after that. So there must be some other (additional?) issue.

zesstra

2013-08-18 17:05

administrator   ~0002196

Could you check for a few things? We have an own limited fallback for getrusage() in some case the system has no usable one and we should first confirm which getrusage implementation is used on your system.

I would like to know if the following defines are defined:
HAVE_GETRUSAGE, CYGWIN, GETRUSAGE_VIA_SYSCALL, RUSAGE_USEC, solaris

I expect and hope that only HAVE_GETRUSAGE is defined...

Sorcerer

2013-08-18 21:56

updater   ~0002201

As far as I can see from within the MUD as well as the command-line call for the driver and its settings file, neither of the above options is defined.

Our system (UNItopia) is a Debian Linux on a 64bit AMD platform. As for the exact versions of ours at the time of reporting this bug, Gnomi might know.

zesstra

2013-08-18 22:26

administrator   ~0002203

On Debian Linux HAVE_GETRUSAGE should be defined (and nothing else of the above).

But in this case: I have no idea, why the time values should stop to change. They might wrap, but I don't see a possibility in our sources that they are constant. If they are, there is a problem with getrusage() of the host system itself.

Gnomi

2013-08-18 22:34

manager   ~0002205

I uploaded our machine.h, HAVE_GETRUSAGE and RUSAGE_USEC are defined.

zesstra

2018-01-29 22:25

administrator   ~0002397

I don't think we will find the cause for this... Assuming it did not occur again during the last 4.5 years. Please re-open, if there is anything new. ;-)

Issue History

Date Modified Username Field Change
2012-06-24 17:25 Sorcerer New Issue
2012-07-11 22:22 zesstra Note Added: 0002141
2012-07-13 15:32 Sorcerer Note Added: 0002148
2012-12-04 21:39 zesstra Note Added: 0002161
2013-08-18 17:05 zesstra Note Added: 0002196
2013-08-18 17:05 zesstra Assigned To => zesstra
2013-08-18 17:05 zesstra Status new => acknowledged
2013-08-18 17:08 zesstra Assigned To zesstra =>
2013-08-18 21:56 Sorcerer Note Added: 0002201
2013-08-18 22:26 zesstra Note Added: 0002203
2013-08-18 22:33 Gnomi File Added: machine.h
2013-08-18 22:34 Gnomi Note Added: 0002205
2018-01-29 22:25 zesstra Status acknowledged => closed
2018-01-29 22:25 zesstra Resolution open => unable to reproduce
2018-01-29 22:25 zesstra Note Added: 0002397