This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Bus Error 10 upon loading protobuf-lua script on OS X

0

I compiled protobuf for lua under Mac OS, one of my post-dissector require to load protobuf.lua file. After finish loading wireshark will crash with Bus Error 10 without giving any details.

my lua script run fine without
require "protobuf"

here is the protobuf-for-lua repo https://github.com/sean-lin/protoc-gen-lua

Is there a flag i can use to check the error in detail ?

alternatively , is there any scripting language i can use other than lua for dissector ? I know there is already protobuf-dissector for wireshark , but it require re-compiling which is hard to do in Mac.

asked 16 Jul '14, 04:01

24hours's gravatar image

24hours
11112
accept rate: 0%

edited 16 Jul '14, 17:18

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196


One Answer:

0

"Bus Error 10" is a low-level operating system error (related to memory access), so no there's no flag to get more details, other than maybe getting the stack trace and (hopefully) debug symbols.

Did you get a stack trace? I.e., when it crashed with the bus error, did a window pop up with details?

And this doesn't appear to be a Wireshark bug, but rather something in protobuf-for-lua. Are you supposed to be using "require "protobuf""? The readme for it appears to say you're not - that instead you're supposed to create a .proto file, "compile" it into a new lua file, and then require that new lua file.

There is no other scripting language for Wireshark other than Lua. What is it you're trying to do exactly? Create a new dissector? Create a tap? Why did you need protobuf-for-lua?

answered 16 Jul '14, 07:16

Hadriel's gravatar image

Hadriel
2.7k2939
accept rate: 18%

Wireshark simply fail with bus error 10 and nothing else.

Im trying to reverse engineer a client-server model using protobuf (proto file already reversed and obtained ). yes, I used required "myprogram_proto" to parse the udp data. and myprogram_proto.lua require protobuf I tried to load required "myprogram_proto" using lua interpreter and does not encounter any error.

https://code.google.com/p/protobuf-wireshark/ Im trying to replicate the function above without having to recompile wireshark , since compiling in MacOS seems to be a pain.

protobuf-for-lua require pb.so file which link lua to c implementation, the most likely reason is I compile pb.c and linked to different Lua version with wireshark

(16 Jul '14, 07:34) 24hours

Wireshark simply fail with bus error 10 and nothing else.

If you open up the Console application (in the Utilities subfolder of Applications), does it show a crash report for "wireshark-bin" under "User Diagnostic Reports"?

(16 Jul '14, 17:19) Guy Harris ♦♦