Re: [sparc64] Strange interaction between 2.6 kernel and 2.5 (and 2.6) glibc

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

 



David Miller wrote:
From: BERTRAND_Joël <joel.bertrand@xxxxxxxxxxx>
Date: Thu, 12 Jul 2007 11:50:38 +0200

	Process stops at line 17384 in clamav-strace:

futex(0x25944f0, FUTEX_WAIT

Line terminaison was written ("2, NULL) = ? ERESTARTSYS (To be restarted)") when I have pressed ctrl+C, but process remains in sleep state. I have tried kill -15 (without any success). Only kill -9 kills clamd.

Can you give this patch a try?

diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h
index 876312f..3b5797e 100644
--- a/include/asm-sparc64/futex.h
+++ b/include/asm-sparc64/futex.h
@@ -14,6 +14,7 @@
 	"	cmp	%2, %1\n"			\
 	"	bne,pn	%%icc, 1b\n"			\
 	"	 mov	0, %0\n"			\
+	"	sra	%1, 0, %1\n"			\
 	"3:\n"						\
 	"	.section .fixup,#alloc,#execinstr\n"	\
 	"	.align	4\n"				\
@@ -88,6 +89,7 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
 {
 	__asm__ __volatile__(
 	"\n1:	casa	[%3] %%asi, %2, %0\n"
+	"	sra	%0, 0, %0\n"
 	"2:\n"
 	"	.section .fixup,#alloc,#execinstr\n"
 	"	.align	4\n"

	David,

I have tried your patch with icemonkey and it hangs (in a futex). Strace output ends with :

futex(0xf2d3b0, FUTEX_WAKE, 1)          = 0
write(5, "\372", 1)                     = 1
ioctl(3, 0x4004667f, 0xfffe5304)        = 0
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN|POLLPR I}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, even
ts=POLLIN|POLLPRI}, {fd=4, events=POLLIN, revents=POLLIN}], 7, -1) = 1
gettimeofday({1185351978, 620970}, NULL) = 0
gettimeofday({1185351978, 621167}, NULL) = 0
gettimeofday({1185351978, 621487}, NULL) = 0
gettimeofday({1185351978, 621671}, NULL) = 0
futex(0x923ec, FUTEX_WAKE, 1)           = 1
futex(0x923e8, FUTEX_WAKE, 1)           = 1
read(4, "\372", 1)                      = 1
futex(0xf9504, FUTEX_WAKE, 1)           = 1
ioctl(3, 0x4004667f, 0xfffe5304)        = 0
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN|POLLPR I}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, even
ts=POLLIN|POLLPRI}], 6, 0) = 0
write(3, "5\30\0\4\1 \30!\0\0\0>\0\22\0\22F\3\0\5\1 \30!\1 \n\236"..., 404) = 40
4
ioctl(3, 0x4004667f, 0xfffe5304)        = 0
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN|POLLPR I}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, even
ts=POLLIN|POLLPRI}, {fd=4, events=POLLIN, revents=POLLIN}], 7, -1) = 1
futex(0xf300d4e4, FUTEX_WAKE, 1)        = 1
futex(0xf300d4e0, FUTEX_WAKE, 1)        = 1
futex(0xf277c8, FUTEX_WAKE, 1)          = 1
futex(0xf2d050, FUTEX_WAKE, 1)          = 1
futex(0xf2d054, FUTEX_WAIT, 1, NULL) = -1 EAGAIN (Resource temporarily unavai
lable)
futex(0xf277c8, FUTEX_WAKE, 1)          = 0
write(5, "\372", 1)                     = 1
ioctl(3, 0x4004667f, 0xfffe5304)        = 0
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN|POLLPR I}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, even
ts=POLLIN|POLLPRI}, {fd=4, events=POLLIN, revents=POLLIN}], 7, -1) = 1
gettimeofday({1185351978, 680377}, NULL) = 0
write(3, "(\30\0\4\1 \3:\0\0\0>\0\0\0\0", 16) = 16
read(3, "\1\1\277\310\0\0\0\0\0@\0\372\0\1\0\27\0\0\0\1\0\0\0\0"..., 32) = 32
write(3, "(\30\0\4\1 \3:\0\0\0>\0\0\0\0", 16) = 16
read(3, "\1\1\277\311\0\0\0\0\0@\0\372\0\1\0\27\0\0\0\1\0\0\0\0"..., 32) = 32
write(3, "(\30\0\4\1 \3:\0\0\0>\0\0\0\0", 16) = 16
read(3, "\1\1\277\312\0\0\0\0\0@\0\372\0\1\0\27\0\0\0\1\0\0\0\0"..., 32) = 32
write(3, "(\30\0\4\1 \3:\0\0\0>\0\0\0\0", 16) = 16
read(3, "\1\1\277\313\0\0\0\0\0@\0\372\0\1\0\27\0\0\0\1\0\0\0\0"..., 32) = 32
write(3, "(\30\0\4\1 \3:\0\0\0>\0\0\0\0", 16) = 16
read(3, "\1\1\277\314\0\0\0\0\0@\0\372\0\1\0\27\0\0\0\1\0\0\0\0"..., 32) = 32
write(3, "(\30\0\4\1 \3:\0\0\0>\0\0\0\0", 16) = 16
read(3, "\1\1\277\315\0\0\0\0\0@\0\372\0\1\0\27\0\0\0\1\0\0\0\0"..., 32) = 32
gettimeofday({1185351978, 688447}, NULL) = 0
gettimeofday({1185351978, 688650}, NULL) = 0
gettimeofday({1185351978, 688958}, NULL) = 0
gettimeofday({1185351978, 689146}, NULL) = 0
futex(0x923ec, FUTEX_WAKE, 1)           = 1
futex(0x923e8, FUTEX_WAKE, 1)           = 1
write(5, "\372", 1)                     = 1
ioctl(3, 0x4004667f, 0xfffe5304)        = 0
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN|POLLPR I}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, even
ts=POLLIN|POLLPRI}], 6, 0) = 0
write(3, "5\30\0\4\1 \30%\0\0\0>\4\t\3U;\3\0\7\1 \27\220\0\0\0\0"..., 7948) = 79
48
ioctl(3, 0x4004667f, 0xfffe5304)        = 0
poll([{fd=3, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN|POLLPR I}, {fd=15, events=POLLIN|POLLPRI}, {fd=16, events=POLLIN|POLLPRI}, {fd=17, even
ts=POLLIN|POLLPRI}, {fd=4, events=POLLIN, revents=POLLIN}], 7, -1) = 1
futex(0xf72cb648, FUTEX_WAIT, 2, NULL)  = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
futex(0xf72cb648, FUTEX_WAIT, 2, NULL)  = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
futex(0xf72cb648, FUTEX_WAIT, 2, NULL

	Last line is not terminated.

	Regards,

	JKB
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux