This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/5637] Misaligned accesses in staprun for ia64 when stapio access denied


------- Additional Comments From dsmith at redhat dot com  2008-01-18 17:08 -------
I'd like to get some additional information about this bug:

(In reply to comment #1)
> When running the systemtap snapshot checkout 20080117 on ia64 attempt to run
> test with following command:
> 
> sudo runtest --tool_opts install --tool systemtap --srcdir
> /home/wcohen/stap_snap_200801141333/src/testsuite systemtap.syscall/syscall.exp

OK, we're running as root since you've used sudo.

> Noticed that there were reports of misaligned accesses when the tests failed:
> 
> 
> Testing 64-bit access
> Executing on host: gcc /home/wcohen/stap_snap_200801141333/src/testsuite/systemt
> ap.syscall/access.c   -lm   -o /tmp/staptest15375/access    (timeout = 300)
> access FAILED. output of "stap -c /tmp/staptest15375/access /home/wcohen/stap_sn
> ap_200801141333/src/testsuite/systemtap.syscall/sys.stp" was:
> ------------------------------------------
> /home/wcohen/stap_testing_200801171833/install/libexec/systemtap/stapio: Permiss
> ion denied

Several questions: 

- Got any ideas on why are we getting permission denied?
- What kernel are you running on this system?
- What are the ownership/permissions on staprun/stapio?
- Are other tests getting unaligned access error or permission denied errors or
just this one?
 
> See in the log the following:
> 
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c884, ip=0x400000000000b7d0
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c87c, ip=0x400000000000b7e1
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c88c, ip=0x400000000000b7f0
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c894, ip=0x400000000000b800
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c89c, ip=0x400000000000b810
> 
> The ip address in the code match up to est15375/access    (timeout = 300)
> access FAILED. output of "stap -c /tmp/staptest15375/access /home/wcohen/stap_sn
> ap_200801141333/src/testsuite/systemtap.syscall/sys.stp" was:
> ------------------------------------------
> /home/wcohen/stap_testing_200801171833/install/libexec/systemtap/stapio: Permiss
> ion denied
> 
> 
> See in the log the following:
> 
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c884, ip=0x400000000000b7d0
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c87c, ip=0x400000000000b7e1
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c88c, ip=0x400000000000b7f0
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c894, ip=0x400000000000b800
> Jan 17 17:52:44 squidward kernel: staprun(16356): unaligned access to
> 0x200000000235c89c, ip=0x400000000000b810
> 
> The ip address in the code match up to lines 52 and 55 in symbols.c
> 
> 	/* Initialize mod. */
> 	memset(mod, 0, sizeof(struct _stp_module)); /* misaligned here */
> 
> 	/* Copy name in and check for overflow. */
> 	strncpy(mod->name, name, STP_MODULE_NAME_LEN); /* misaligned here */
> 
> 1) Should root be able to run or does root need to be added to /etc/groups?

Root should be able to run staprun/stapio without belonging to any certain group.

> 2) If root can't run stapio, then staprun be more graceful and not create
> unaligned accesses?

It is odd to me that only when root can't run stapio we get unaligned accesses.
 I only see get_sections() getting called from send_module(), which does the
following:

	char data[65536];
	int len;
	*(int32_t *)data = STP_MODULE;
	len = get_sections(mname, data + sizeof(int32_t),
			   sizeof(data) - sizeof(int32_t));

Does the ia64 have special alignment restrictions?

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=5637

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]