Getting strace to work was an interesting task - first I forgot to add
strace to buildrequires, then I forgot to use the -f flag to cause it
to follow forks... Anyway, it works not, and I'll never forget how to
do it again. :)
Here's a snippet of the log file starting from where strace logs the
creation of the lock file, and ending at the removal of that file
during initialization. I'm guessing that somewhere in the middle is a
failed call that causes the system to shutdown while on its way up.
- - - - - - - - - - - - - - - - -
open("/usr/src/packages/BUILD/dnx-0.15.1/client/testrun/dnxClient.pid",
O_RDWR|O_CREAT, 0644) = 6
flock(6, LOCK_EX|LOCK_NB) = 0
write(6, "11002\n", 6) = 6
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
bind(7, {sa_family=AF_INET, sin_port=htons(12480),
sin_addr=inet_addr("0.0.0.0")}, 16) = 0
socket(PF_NETLINK, SOCK_RAW, 0) = 8
bind(8, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(8, {sa_family=AF_NETLINK, pid=11002, groups=00000000}, [12]) = 0
time(NULL) = 1204230691
sendto(8, "\24\0\0\0\22\0\1\3#\32\307G\0\0\0\0\0\0\0\0", 20, 0,
{sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\350\0\0\0\20\0\2\0#\32\307G\372*\0\0\0\0\4\3\1\0\0\0I\0\0\0\0\0\0\0"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 232
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\24\0\0\0\3\0\2\0#\32\307G\372*\0\0\0\0\0\0\1\0\0\0I\0\0\0\0\0\0\0"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 20
sendto(8, "\24\0\0\0\26\0\1\3$\32\307G\0\0\0\0\0\0\0\0", 20, 0,
{sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"<\0\0\0\24\0\2\0$\32\307G\372*\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 60
recvmsg(8, {msg_name(12)={sa_family=AF_NETLINK, pid=0,
groups=00000000},
msg_iov(1)=[{"\24\0\0\0\3\0\2\0$\32\307G\372*\0\0\0\0\0\0\1\0\0\0\10\0\1\0\177\0\0\1"...,
4096}], msg_controllen=0, msg_flags=0}, 0) = 20
close(8) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbff4c6f8) = -1 ENOTTY
(Inappropriate ioctl for device)
time(NULL) = 1204230691
write(3, "[Thu Feb 28 20:31:31 2008] WLM: "..., 69) = 69
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbff4c738) = -1 ENOTTY
(Inappropriate ioctl for device)
time(NULL) = 1204230691
write(3, "[Thu Feb 28 20:31:31 2008] Threa"..., 84) = 84
close(7) = 0
unlink("/usr/src/packages/BUILD/dnx-0.15.1/client/testrun/dnxClient.pid") = 0
close(6) = 0
- - - - - - - - - - - - - - - - -
After analyzing this trace I can see by mapping the write(3, ...)
calls to my source code that this code is failing:
// cache our (primary?) ip address in binary and string format
if (getifaddrs(&ifa) == 0)
{
u_int setflags = IFF_UP | IFF_RUNNING;
u_int clrflags = IFF_LOOPBACK;
struct ifaddrs * ifcur = ifa;
// locate the first proper AF_NET address in our interface list
while (ifcur && (ifcur->ifa_addr->sa_family != AF_INET
|| (ifcur->ifa_flags & setflags) != setflags
|| (ifcur->ifa_flags & clrflags) != 0))
ifcur = ifcur->ifa_next;
if (ifcur)
{
// cache binary and presentation (string) versions of the ip address
iwlm->myipaddr = (unsigned long)
((struct sockaddr_in *)ifcur->ifa_addr)->sin_addr.s_addr;
inet_ntop(ifcur->ifa_addr->sa_family,
&((struct sockaddr_in *)ifcur->ifa_addr)->sin_addr,
iwlm->myipaddrstr, sizeof iwlm->myipaddrstr);
}
freeifaddrs(ifa);
}
Does this tell you guys anything? I can't really see why it would
fail. I'm just trying to get my network interface list so I can send
my identity (ip address, in string format) to the server portion of my
package. If I can't get this information, I bail. I guess it'd be a
bit more robust if I just didn't care whether or not this code worked
- I don't use the address for anything except logging, but it should
work, shouldn't it?
Thanks again (in advance) for any insight you might have,
John
On Thu, Feb 28, 2008 at 1:27 PM, Marcus Rueckert
On 2008-02-28 21:03:30 +0100, Adrian Schröter wrote:
On Thursday 28 February 2008 20:48:53 wrote John Calcote:
Hi list,
I added a unit test to my project at home:jcalcote/dnx
This project built on all flavors of SuSE linux, plus fedora, debian, and ubuntu 7 before I added this new unit test. Now it fails on all but the debian and ubuntu builds - probably because these platforms' hacked up control files don't run "make check".
I can successfully build this package locally - it just won't build on the obs servers.
Maybe due to the fact that these have no internet access ? Another possibility would be that they do not like the XEN kernel for some reason.
Please try to add an "strace" before the unit test to find out a bit more.
or maybe it requires root access due to port < 1024?
darix
-- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org