Project

General

Profile

Bug #6500

Cannot print() tcpsinfo_t due to bad alignment

Added by Ryan Zezeski almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DTrace
Start date:
2015-12-06
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

# uname -a
SunOS sys76 5.11 joyent_20151015T063628Z i86pc i386 i86pc
# dtrace -n 'tcp:::send { print(*args[3]); }'
dtrace: description 'tcp:::send ' matched 4 probes

dtrace: error on enabled probe ID 2 (ID 8545: tcp:ip:tcp_send_data:send): invalid alignment (0xffffff0e7899127a) in action #1 at DIF offset 416
^C
dtrace: error on enabled probe ID 2 (ID 8545: tcp:ip:tcp_send_data:send): invalid alignment (0xffffff0e7859027a) in action #1 at DIF offset 416
dtrace: error on enabled probe ID 2 (ID 8545: tcp:ip:tcp_send_data:send): invalid alignment (0xffffff0e785902b2) in action #1 at DIF offset 416

I spent a few hours trying to debug this. I learned a few things that might help.

1. I can print the individual members of tcpsinfo_t without issue.

2. I can print the tcp_t structure without issue. I.e., print(*((tcp_t *)arg3)). I believe the issue has something to do with the translation from tcp_t to tcpsinfo_t.

3. Assuming the "DIF offset" correlates with the DIF output from -S, it fails while executing the pushtv instruction.

4. Printing args[4] also fails because of bad alignment. However, it's "DIF offset" is too large for the output generated by -S.

The only related issue I found is #3511. Which removed the alignment requirements of dtrace_load functions for AMD64.


Files

send-DIF.txt (16.1 KB) send-DIF.txt Ryan Zezeski, 2015-12-06 05:54 PM

Also available in: Atom PDF