Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librdkafka tests crash on solaris #340

Closed
sh9189 opened this issue Jul 29, 2015 · 14 comments
Closed

librdkafka tests crash on solaris #340

sh9189 opened this issue Jul 29, 2015 · 14 comments

Comments

@sh9189
Copy link

sh9189 commented Jul 29, 2015

I am getting Bus Error (core dumped) when running 0002-unkpart.test in tests directory.
Running the test under gdb shows the following stack trace
#0 0x0002e748 in rd_kafka_metadata_handle (rko=0x55128, size=369, buf=0x554c0 "", rkb=0x54218) at rdkafka_broker.c:890
#1 rd_kafka_broker_metadata_reply (rkb=0x54218, err=, reply=, request=, opaque=0x55128) at rdkafka_broker.c:1033
#2 0x00029710 in rd_kafka_req_response (rkbuf=0x553e8, rkb=0x54218) at rdkafka_broker.c:1327
#3 rd_kafka_recv (rkb=rkb@entry=0x54218) at rdkafka_broker.c:1519
#4 0x0002a258 in rd_kafka_broker_io_serve (rkb=rkb@entry=0x54218) at rdkafka_broker.c:2458
#5 0x0002bb78 in rd_kafka_broker_ua_idle (rkb=0x54218) at rdkafka_broker.c:2481
#6 rd_kafka_broker_thread_main (arg=0x54218) at rdkafka_broker.c:4161
#7 0xf0355858 in _lwp_start () from /lib/libc.so.1

Backtrace stopped: previous frame identical to this frame (corrupt stack?)

and the crash is in
_READ_STR_MSH(md->topics[i].topic);
printing md->topics shows that it is empty
{topic = 0x0, partition_cnt = 0, partitions = 0x0, err = RD_KAFKA_RESP_ERR_NO_ERROR}

@sh9189
Copy link
Author

sh9189 commented Jul 29, 2015

I am building from master branch

@DEvil0000
Copy link
Contributor

do you have at least one topic created on your kafka broker?

@sh9189
Copy link
Author

sh9189 commented Jul 29, 2015

Yes I have multiple topics created on the broker. Using the same test.conf on linux all tests pass. It looks like the crash is just in solaris.

@sh9189
Copy link
Author

sh9189 commented Jul 29, 2015

Here is my test.conf file
metadata.broker.list=iny1-cas-r1n06.inf.bloomberg.com:9092
and the output from kafka-topics list
bin/kafka-topics.sh --list --zookeeper iny1-cas-r1n06.inf.bloomberg.com:2181/kafka
abc - marked for deletion
collectd
internal_logs
logchipper
logchipperlogs - marked for deletion
monitored_logs
monitoredlogs - marked for deletion
nxlog_logs
rdkafkatest_0012
rdkafkatest_447fd8d13be7a17d_0014
rdkafkatest_77624c8c768a45c4_autotopic
rdkafkatest_generic
sor.topic.exchange
sparktest.topic.exchange
test

@edenhill
Copy link
Contributor

SIGBUS on Solaris are usually alignment errors, i.e., trying to read a multibyte word from a non-aligned address.
The RD_KAFKAP_STR_SIZE() macro needs to be modified to perform safe unaligned reads.

@edenhill edenhill added the bug label Jul 30, 2015
@edenhill edenhill added this to the dev15_merge milestone Aug 27, 2015
@edenhill
Copy link
Contributor

edenhill commented Sep 8, 2015

Fixed on oct15 branch

edenhill added a commit that referenced this issue Sep 8, 2015
- Fix alignment issues. No more packed structs (#340)
- Proper interface to rd_kafka_buf_t
@VenkatTT
Copy link

Hi,

I am trying to execute rdkafka_example_cpp on Solaris from librdkafka-0.8.6. However, i am facing SIGBUS error. could you please help me how to resolve this issue.

Regards,
Venkat

@edenhill
Copy link
Contributor

@VenkatTT This is fixed on the oct15 branch and will be merged to master within 3-4 weeks.

@edenhill
Copy link
Contributor

The oct15 branch will be in a usable state within a week or so.

@VenkatTT
Copy link

Thank you very much

@VenkatTT
Copy link

@edenhill could you please update me on this issue or suggest which branch i can use.

@VenkatTT
Copy link

VenkatTT commented Nov 2, 2015

@edenhill Can i use oct15 branch to fix bus alignment issues on solaris?

@edenhill
Copy link
Contributor

edenhill commented Nov 2, 2015

The oct15 branch is in Alpha stage and is not really usable for anything other than testing.

A proper release will be available in a month's time, while a merge to master for beta testing will be available in a week or so.

@edenhill
Copy link
Contributor

Fixed on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants