pkgsrc-Bugs archive

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

Re: pkg/49851



christos%zoulas.com@localhost (Christos Zoulas) writes:

>  Interesting...
>  Can you do "info thread" and then "thread <n>" on each and "where"?

Thanks !

I did and I spotted another call to get local time

I commented it out as well,

Now in top I see

18855 german    85    0   127M   11M netio/1    0:25  0.00%  0.00% gtk-gnutella
 
in gdb, I see

gdb) info thread
  Id   Target Id         Frame 
  6    LWP 2             0x00007f7fef43c42a in _sys___nanosleep50 ()
   from /usr/lib/libc.so.12
  5    LWP 3             0x00007f7fef43c3ea in poll ()
   from /usr/lib/libc.so.12
  4    LWP 5             0x00007f7fef49f65a in ___lwp_park60 ()
   from /usr/lib/libc.so.12
  3    LWP 6             0x00007f7fef49f65a in ___lwp_park60 ()
   from /usr/lib/libc.so.12
  2    LWP 7             0x00007f7fef49f65a in ___lwp_park60 ()
   from /usr/lib/libc.so.12
* 1    LWP 1             0x00007f7fef49f65a in ___lwp_park60 ()
   from /usr/lib/libc.so.12

(gdb) where 20
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x00007f7fef80ad55 in pthread.park () from /usr/lib/libpthread.so.1
#2  0x00007f7fef807dbc in ?? () from /usr/lib/libpthread.so.1
#3  0x00007f7fef80a29a in pthread_create () from /usr/lib/libpthread.so.1
#4  0x000000000062c4d1 in thread_launch (stack=32768, flags=0, 
    arg=0x7f7ff7beaf08, routine=0x6b75a0 <tquicksort>, te=0x7f7ff7edaa58)
    at thread.c:7618
#5  thread_create_full (routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7beaf08, flags=flags@entry=0, 
    stack=stack@entry=32768, exited=exited@entry=0x0, earg=earg@entry=0x0)
    at thread.c:7727
#6  0x000000000062c7ab in thread_create (
    routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7beaf08, flags=flags@entry=0, 
    stack=stack@entry=32768) at thread.c:7653
#7  0x00000000006b81ea in tquicksort (arg=arg@entry=0x7f7ff7bffee0)
    at tqsort.c:377
#8  0x000000000062c192 in thread_launch_trampoline (arg=0x7f7ff7fb90e0)
    at thread.c:7482
#9  0x00007f7fef80a9cc in ?? () from /usr/lib/libpthread.so.1
#10 0x00007f7fef483d90 in ?? () from /usr/lib/libc.so.12
#11 0x2c8e0680169bfc51 in ?? ()
#12 0x2c8e33f9ec7b233d in ?? ()


gdb) thread 2
[Switching to thread 2 (LWP 7)]
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
(gdb) where 20
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x00007f7fef80ad55 in pthread.park () from /usr/lib/libpthread.so.1
#2  0x00007f7fef807dbc in ?? () from /usr/lib/libpthread.so.1
#3  0x00007f7fef80a29a in pthread_create () from /usr/lib/libpthread.so.1
#4  0x000000000062c4d1 in thread_launch (stack=32768, flags=0, 
    arg=0x7f7ff7beaf08, routine=0x6b75a0 <tquicksort>, te=0x7f7ff7edaa58)
    at thread.c:7618
#5  thread_create_full (routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7beaf08, flags=flags@entry=0, 
    stack=stack@entry=32768, exited=exited@entry=0x0, earg=earg@entry=0x0)
    at thread.c:7727
#6  0x000000000062c7ab in thread_create (
    routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7beaf08, flags=flags@entry=0, 
    stack=stack@entry=32768) at thread.c:7653
#7  0x00000000006b81ea in tquicksort (arg=arg@entry=0x7f7ff7bffee0)
    at tqsort.c:377
#8  0x000000000062c192 in thread_launch_trampoline (arg=0x7f7ff7fb90e0)
    at thread.c:7482
#9  0x00007f7fef80a9cc in ?? () from /usr/lib/libpthread.so.1
#10 0x00007f7fef483d90 in ?? () from /usr/lib/libc.so.12
#11 0x2c8e0680169bfc51 in ?? ()
#12 0x2c8e33f9ec7b233d in ?? ()

(gdb) thread 3
[Switching to thread 3 (LWP 6)]
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
(gdb) where 20
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x00007f7fef80ad55 in pthread.park () from /usr/lib/libpthread.so.1
#2  0x00007f7fef807dbc in ?? () from /usr/lib/libpthread.so.1
#3  0x00007f7fef80a29a in pthread_create () from /usr/lib/libpthread.so.1
#4  0x000000000062c4d1 in thread_launch (stack=32768, flags=0, 
    arg=0x7f7ff7bffe48, routine=0x6b75a0 <tquicksort>, te=0x7f7ff7eda740)
    at thread.c:7618
#5  thread_create_full (routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7bffe48, flags=flags@entry=0, 
    stack=stack@entry=32768, exited=exited@entry=0x0, earg=earg@entry=0x0)
    at thread.c:7727
#6  0x000000000062c7ab in thread_create (
    routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7bffe48, flags=flags@entry=0, 
    stack=stack@entry=32768) at thread.c:7653
#7  0x00000000006b81ea in tquicksort (arg=arg@entry=0x7f7ff7bfff08)
    at tqsort.c:377
#8  0x00000000006b77fe in tquicksort (arg=arg@entry=0x7f7fffffd7b8)
    at tqsort.c:392
#9  0x000000000062c192 in thread_launch_trampoline (arg=0x7f7ff7fb90e0)
    at thread.c:7482
#10 0x00007f7fef80a9cc in ?? () from /usr/lib/libpthread.so.1
#11 0x00007f7fef483d90 in ?? () from /usr/lib/libc.so.12
#12 0x00010102464c457f in ?? ()

(gdb) thread 4
[Switching to thread 4 (LWP 5)]
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
(gdb) where 20
#0  0x00007f7fef49f65a in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x00007f7fef80ad55 in pthread.park () from /usr/lib/libpthread.so.1
#2  0x00007f7fef807dbc in ?? () from /usr/lib/libpthread.so.1
#3  0x00007f7fef80a29a in pthread_create () from /usr/lib/libpthread.so.1
#4  0x000000000062c4d1 in thread_launch (stack=32768, flags=0, 
    arg=0x7f7ff7f23ee0, routine=0x6b75a0 <tquicksort>, te=0x7f7ff7ed0000)
    at thread.c:7618
#5  thread_create_full (routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7f23ee0, flags=flags@entry=0, 
    stack=stack@entry=32768, exited=exited@entry=0x0, earg=earg@entry=0x0)
    at thread.c:7727
#6  0x000000000062c7ab in thread_create (
    routine=routine@entry=0x6b75a0 <tquicksort>, 
    arg=arg@entry=0x7f7ff7f23ee0, flags=flags@entry=0, 
    stack=stack@entry=32768) at thread.c:7653
#7  0x00000000006b7b93 in tquicksort (arg=arg@entry=0x7f7fffffd850)
    at tqsort.c:317
#8  0x000000000062c192 in thread_launch_trampoline (arg=0x7f7ff7fb90a0)
    at thread.c:7482
#9  0x00007f7fef80a9cc in ?? () from /usr/lib/libpthread.so.1
#10 0x00007f7fef483d90 in ?? () from /usr/lib/libc.so.12
#11 0x0000000000b4bd08 in local_pmap ()
#12 0x0000000000810080 in vendor_map ()
#13 0x0000000100000949 in ?? ()
#14 0x0000000000aaee30 in ?? ()
#15 0x00000000008144a8 in assertion_data_.17186 ()
#16 0x00000000000005f7 in ?? ()
#17 0x0000000000aaee30 in ?? ()
#18 0x00000000008144a8 in assertion_data_.17186 ()

(gdb) thread 5
[Switching to thread 5 (LWP 3)]
(gdb) where 40
#0  0x00007f7fef43c3ea in poll () from /usr/lib/libc.so.12
#1  0x00007f7fef8070f7 in poll () from /usr/lib/libpthread.so.1
#2  0x00000000005bca75 in compat_poll (fds=<optimized out>, 
    n=<optimized out>, timeout=<optimized out>) at compat_poll.c:175
#3  0x000000000062ceee in thread_element_block_until (
    te=te@entry=0x7f7ff7fca318, events=<optimized out>, 
    end=end@entry=0x7f7ff7fa4ed0) at thread.c:6990
#4  0x000000000062d52d in thread_sleep_interruptible (ms=<optimized out>, 
    mask=mask@entry=0x7f7ff7fa4f3c, interrupt=interrupt@entry=1)
    at thread.c:9302
#5  0x000000000062e624 in thread_timed_sigsuspend (
    mask=mask@entry=0x7f7ff7fa4f3c, timeout=timeout@entry=0x7f7ff7fa4f40)
    at thread.c:9372
#6  0x00000000005cccf4 in evq_thread_main (unused_arg=unused_arg@entry=0x0)
    at evq.c:253
#7  0x000000000062c192 in thread_launch_trampoline (arg=0x7f7ff7fb9020)
    at thread.c:7482
#8  0x00007f7fef80a9cc in ?? () from /usr/lib/libpthread.so.1
#9  0x00007f7fef483d90 in ?? () from /usr/lib/libc.so.12
#10 0x0000000000aae940 in ?? ()
#11 0x00000000007980a8 in assertion_data_ ()
#12 0x0000000000002437 in ?? ()
#13 0x0000000000b76408 in xfreelist ()
#14 0x00000000008144a8 in assertion_data_.17186 ()

gdb) thread 6
[Switching to thread 6 (LWP 2)]
#0  0x00007f7fef43c42a in _sys___nanosleep50 () from /usr/lib/libc.so.12
(gdb) where 40
#0  0x00007f7fef43c42a in _sys___nanosleep50 () from /usr/lib/libc.so.12
#1  0x00007f7fef8070ae in __nanosleep50 () from /usr/lib/libpthread.so.1
#2  0x0000000000655b5c in compat_sleep_ms (ms=ms@entry=1000)
    at compat_sleep_ms.c:67
#3  0x000000000062fea0 in tm_thread_main (unused_arg=unused_arg@entry=0x0)
    at tm.c:446
#4  0x000000000062c192 in thread_launch_trampoline (arg=0x7f7ff7fb9000)
    at thread.c:7482
#5  0x00007f7fef80a9cc in ?? () from /usr/lib/libpthread.so.1
#6  0x00007f7fef483d90 in ?? () from /usr/lib/libc.so.12
#7  0x00007f7ff7f95180 in ?? ()



>  Or how do I reproduce it? What do I need to install?

I have been installing the gtk-gnutella from pkgsrc with the following patch:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/gtk-gnutella/Makefile,v
retrieving revision 1.90
diff -r1.90 Makefile
3c3
< DISTNAME=	gtk-gnutella-0.96.6
---
> DISTNAME=	gtk-gnutella-1.1.5
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/gtk-gnutella/PLIST,v
retrieving revision 1.16
diff -r1.16 PLIST
31c31
< share/gtk-gnutella/pixmaps/icon.32x32.xpm
---
> share/gtk-gnutella/pixmaps/icon.48x48.xpm
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/gtk-gnutella/distinfo,v
retrieving revision 1.30
diff -r1.30 distinfo
3,7c3,13
< SHA1 (gtk-gnutella-0.96.6.tar.bz2) = 319417e8de104b33913e08a0aaec8c0f22a6129d
< RMD160 (gtk-gnutella-0.96.6.tar.bz2) = 0dae6af9ac64fa8d75980cafd55c5a3e9eb18dfe
< Size (gtk-gnutella-0.96.6.tar.bz2) = 15739240 bytes
< SHA1 (patch-aa) = 0df2e52177c1601b0533862a841ef61b2ac440ca
< SHA1 (patch-ab) = 45d59a62acbfa38a952cf31e8ceecacc9c90f077
---
> SHA1 (gtk-gnutella-1.1.5.tar.bz2) = d442ae404dfb66470fdd9114bedbe7d44bb0fb81
> RMD160 (gtk-gnutella-1.1.5.tar.bz2) = 8e20f1959178e028a58d8b8adf2995b5dcf6f2e9
> Size (gtk-gnutella-1.1.5.tar.bz2) = 19552392 bytes
> SHA1 (patch-Configure) = 7739c9ed21f5e3e1d8f3f44292eeed2a08cdcee8
> SHA1 (patch-src_lib_entropy.c) = 62e7e673f91020d0b425ed889fb2881c0177997e
> SHA1 (patch-src_lib_log.c) = 22874575a49c96be45d3b37f10752144abd7e8d1
> SHA1 (patch-src_lib_pow2.h) = 59684509ca8bfabacbb5c01b95ff2259a7991614
> SHA1 (patch-src_lib_rand31.c) = da39a3ee5e6b4b0d3255bfef95601890afd80709
> SHA1 (patch-src_lib_thread.h) = f2ba18a5906f47793763029f7afe1a9491136821
> SHA1 (patch-src_lib_tm.c) = 2adb5ae79ced7b39d3b2a13f71b7db4127d35649
> SHA1 (patch-src_shell_thread.c) = 00fb9c1afd3bbfc1d6be67e24850c6b12296a783
Index: patches/patch-Configure
===================================================================
RCS file: patches/patch-Configure
diff -N patches/patch-Configure
0a1,16
> $NetBSD$
> 
> --- Configure.orig	2015-10-08 16:15:32.000000000 +0000
> +++ Configure
> @@ -4591,6 +4591,11 @@ eval $trylink
>  set libintl.h i_libintl
>  eval $inhdr
>  
> +d_gettext="$define"
> +i_libintl="$define"
> +d_nls="$define"
> +d_enablenls="$define"
> +
>  : determine whether we support NLS
>  echo " "
>  case "$d_nls" in
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
1,16d0
< $NetBSD: patch-aa,v 1.9 2009/05/05 06:46:56 adam Exp $
< 
< --- Configure.orig	2009-03-29 17:37:52.000000000 +0200
< +++ Configure
< @@ -4043,6 +4043,11 @@ done'
<  set libintl.h i_libintl
<  eval $inhdr
<  
< +d_gettext="$define"
< +i_libintl="$define"
< +d_nls="$define"
< +d_enablenls="$define"
< +
<  : determine whether we support NLS
<  echo " "
<  case "$d_nls" in
Index: patches/patch-ab
===================================================================
RCS file: patches/patch-ab
diff -N patches/patch-ab
1,22d0
< $NetBSD: patch-ab,v 1.7 2009/07/14 09:41:31 hasso Exp $
< 
< SVN rev 16947 from upstream.
< 
< --- src/lib/entropy.c.orig	2009-07-14 12:11:05 +0300
< +++ src/lib/entropy.c	2009-07-14 12:11:54 +0300
< @@ -120,15 +120,12 @@ entropy_collect(struct sha1 *digest)
<  		 * Compute the SHA1 of the output (either ps or /dev/urandom).
<  		 */
<  
< -		SHA1Input(&ctx, f, sizeof *f);		/* Initial state */
< -
<  		for (;;) {
<  			guint8 data[1024];
<  			int r;
<  			int len = is_pipe ? sizeof(data) : 128;
<  
<  			r = fread(data, 1, len, f);
< -			SHA1Input(&ctx, f, sizeof *f);	/* Changes as we read */
<  			if (r)
<  				SHA1Input(&ctx, data, r);
<  			if (r < len || !is_pipe)		/* Read once from /dev/urandom */
Index: patches/patch-src_lib_entropy.c
===================================================================
RCS file: patches/patch-src_lib_entropy.c
diff -N patches/patch-src_lib_entropy.c
0a1,31
> $NetBSD$
> 
> --- src/lib/entropy.c.orig	2015-10-08 16:15:36.000000000 +0000
> +++ src/lib/entropy.c
> @@ -1252,7 +1252,7 @@ entropy_seed(struct entropy_minictx *c)
>  	tm_precise_time(&now);		/* Do not use tm_now_exact(), it's too soon */
>  	SHA1_INPUT(&ctx, now);
>  
> -	j = popcount(now.tv_nsec);
> +	j = popcount_(now.tv_nsec);
>  	for (i = 0; i <= j; i++) {
>  		ENTROPY_CONTEXT_FEED;
>  	}
> @@ -1334,7 +1334,7 @@ entropy_seed(struct entropy_minictx *c)
>  	SHA1_INPUT(&ctx, now);
>  
>  	tm_precise_time(&now);
> -	j = popcount(now.tv_nsec * 11);
> +	j = popcount_(now.tv_nsec * 11);
>  	for (i = 0; i <= j; i++) {
>  		ENTROPY_CONTEXT_FEED;
>  	}
> @@ -1351,7 +1351,7 @@ entropy_seed(struct entropy_minictx *c)
>  
>  		entropy_delay();
>  		tm_precise_time(&now);
> -		n = popcount(peek_be32(p) + now.tv_nsec);
> +		n = popcount_(peek_be32(p) + now.tv_nsec);
>  		j = UINT32_ROTR(v, n) & 0xff;
>  		for (i = 0; i <= j; i++) {
>  			ENTROPY_CONTEXT_FEED;
Index: patches/patch-src_lib_log.c
===================================================================
RCS file: patches/patch-src_lib_log.c
diff -N patches/patch-src_lib_log.c
0a1,73
> $NetBSD$
> 
> --- src/lib/log.c.orig	2015-10-08 16:15:36.000000000 +0000
> +++ src/lib/log.c
> @@ -638,7 +638,7 @@ log_printable(enum log_file which)
>   * Emit log message.
>   */
>  static void
> -log_fprint(enum log_file which, const struct tm *ct, long usec,
> +log_fprint(enum log_file which, long usec,
>  	GLogLevelFlags level, const char *prefix, unsigned stid, const char *msg)
>  {
>  	struct logfile *lf;
> @@ -647,7 +647,7 @@ log_fprint(enum log_file which, const st
>  	str_t *ls;
>  	ssize_t w;
>  
> -#define FORMAT_STR	"%02d-%02d-%02d %.02d:%.02d:%.02d.%03ld (%s)%s%s: %s\n"
> +#define FORMAT_STR	"%03ld (%s)%s%s: %s\n"
>  
>  	log_file_check(which);
>  
> @@ -675,9 +675,7 @@ log_fprint(enum log_file which, const st
>  		ls = logstring_object();
>  
>  	str_printf(ls, FORMAT_STR,
> -		(TM_YEAR_ORIGIN + ct->tm_year) % 100,
> -		ct->tm_mon + 1, ct->tm_mday,
> -		ct->tm_hour, ct->tm_min, ct->tm_sec, usec / 1000, tprefix,
> +		usec / 1000, tprefix,
>  		(level & G_LOG_FLAG_RECURSION) ? " [RECURSIVE]" : "",
>  		(level & G_LOG_FLAG_FATAL) ? " [FATAL]" : "",
>  		msg);
> @@ -1977,8 +1975,9 @@ log_handler(const char *domain, GLogLeve
>  	const char *message, void *unused_data)
>  {
>  	int saved_errno = errno;
> -	time_t now;
> -	struct tm *ct;
> +
> +	
> +
>  	tm_t tv;
>  	const char *prefix;
>  	char *safer;
> @@ -1990,8 +1989,8 @@ log_handler(const char *domain, GLogLeve
>  		return;
>  
>  	tm_now_exact(&tv);
> -	now = tv.tv_sec;
> -	ct = localtime(&now);
> +
> +	
>  
>  	prefix = log_prefix(level);
>  	stid = thread_small_id();
> @@ -2003,14 +2002,14 @@ log_handler(const char *domain, GLogLeve
>  		safer = control_escape(message);
>  	}
>  
> -	log_fprint(LOG_STDERR, ct, tv.tv_usec, level, prefix, stid, safer);
> +	log_fprint(LOG_STDERR, tv.tv_usec, level, prefix, stid, safer);
>  
>  	if G_UNLIKELY(
>  		level &
>  			(G_LOG_FLAG_FATAL | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR)
>  	) {
>  		if (log_stdout_is_distinct())
> -			log_fprint(LOG_STDOUT, ct, tv.tv_usec, level, prefix, stid, safer);
> +			log_fprint(LOG_STDOUT, tv.tv_usec, level, prefix, stid, safer);
>  		if (level & G_LOG_FLAG_FATAL)
>  			crash_set_error(safer);
>  	}
Index: patches/patch-src_lib_pow2.h
===================================================================
RCS file: patches/patch-src_lib_pow2.h
diff -N patches/patch-src_lib_pow2.h
0a1,31
> $NetBSD$
> 
> --- src/lib/pow2.h.orig	2015-10-08 16:15:36.000000000 +0000
> +++ src/lib/pow2.h
> @@ -67,7 +67,7 @@ is_pow2(uint32 value)
>   * @return number of 1 bits in a 32-bit integer.
>   */
>  static inline ALWAYS_INLINE G_GNUC_CONST int
> -popcount(uint32 x)
> +popcount_(uint32 x)
>  #ifdef HAS_BUILTIN_POPCOUNT
>  {
>  	return __builtin_popcount(x);
> @@ -153,7 +153,7 @@ clz(uint32 x)
>  	x |= x >> 4;
>  	x |= x >> 8;
>  	x |= x >> 16;
> -	return 32 - popcount(x);
> +	return 32 - popcount_(x);
>  }
>  #endif	/* HAS_BUILTIN_CLZ */
>  
> @@ -176,7 +176,7 @@ int bits_set(uint8 b) G_GNUC_PURE;
>  static inline ALWAYS_INLINE G_GNUC_CONST int
>  bits_set32(uint32 v)
>  {
> -	return popcount(v);
> +	return popcount_(v);
>  }
>  
>  #endif /* _pow2_h_ */
Index: patches/patch-src_lib_rand31.c
===================================================================
RCS file: patches/patch-src_lib_rand31.c
diff -N patches/patch-src_lib_rand31.c
Index: patches/patch-src_lib_thread.h
===================================================================
RCS file: patches/patch-src_lib_thread.h
diff -N patches/patch-src_lib_thread.h
0a1,15
> $NetBSD$
> 
> --- src/lib/thread.h.orig	2015-10-08 16:15:36.000000000 +0000
> +++ src/lib/thread.h
> @@ -36,6 +36,10 @@
>  
>  #include "tsig.h"		/* For tsigset_t */
>  
> +#ifndef PTHREAD_STACK_MIN
> +#define PTHREAD_STACK_MIN 0
> +#endif
> +
>  /**
>   * Main entry point for thread_create().
>   */
Index: patches/patch-src_lib_tm.c
===================================================================
RCS file: patches/patch-src_lib_tm.c
diff -N patches/patch-src_lib_tm.c
0a1,24
> $NetBSD$
> 
> --- src/lib/tm.c.orig	2015-10-08 16:15:36.000000000 +0000
> +++ src/lib/tm.c
> @@ -330,8 +330,8 @@ tm_updated(const tm_t *prev, const tm_t 
>  	need_update = gentime_diff(gnow, tm_gmt.updated) > TM_GMT_PERIOD / 10
>  		&& need_update;
>  
> -	if G_UNLIKELY(need_update)
> -		tm_update_gmt_offset((time_t) now->tv_sec);
> +	//	if G_UNLIKELY(need_update)
> +	//	tm_update_gmt_offset((time_t) now->tv_sec);
>  
>  	/*
>  	 * When time is shifting suddenly (system-wide time adjustment, either
> @@ -364,7 +364,7 @@ tm_updated(const tm_t *prev, const tm_t 
>  		s_message("TM system clock changed, delta=%+ld ms", (long) delta);
>  	}
>  
> -	tm_update_gmt_offset((time_t) now->tv_sec);
> +	//tm_update_gmt_offset((time_t) now->tv_sec);
>  	tm_event_fire(delta);
>  
>  	if (tm_debugging(2)) {
Index: patches/patch-src_shell_thread.c
===================================================================
RCS file: patches/patch-src_shell_thread.c
diff -N patches/patch-src_shell_thread.c
0a1,23
> $NetBSD$
> 
> --- src/shell/thread.c.orig	2015-10-08 16:15:37.000000000 +0000
> +++ src/shell/thread.c
> @@ -49,6 +49,9 @@
>  
>  #include "lib/override.h"		/* Must be the last header included */
>  
> +#include <limits.h>
> +
> +
>  #define ACTIVE_THRESH	10		/**< (s) thread inactivity threshold */
>  
>  static enum shell_reply
> @@ -105,7 +108,7 @@ shell_exec_thread_list(struct gnutella_s
>  				delta_time(now, info.last_seen) > ACTIVE_THRESH) ? 'I' : 'R');
>  		str_putc(s, ' ');
>  		str_catf(s, "%-3zd ", info.locks);
> -		str_catf(s, "%-4d ", popcount(info.sig_pending));
> +		str_catf(s, "%-4d ", popcount_(info.sig_pending));
>  		if (teq_is_supported(i)) {
>  			str_catf(s, "%-4zu ", teq_count(i));
>  		} else {


-- 
Germain
http://german.free.fr



Home | Main Index | Thread Index | Old Index