From: zhenyu.ren@aliyun.com (zhenyu.ren)
Subject: [lttng-dev] epoll_wait reboot kernel?
Date: Mon, 24 Feb 2014 17:36:36 +0800 [thread overview]
Message-ID: <494972cb-79c7-4197-981c-d682306d585e@aliyun.com> (raw)
In-Reply-To: a860adc0-d68a-4a1e-bbd1-775c1cf652e9@aliyun.com
Oh,It seems not epoll related . I am using DBG/ERR() as debug way ,but this print-style method doesn't work as expected,so I mistake for epoll_wait.
It seems gcc problem because if I changed lib_ring_buffer_do_copy as the following,all work well
#define lib_ring_buffer_do_copy(config, dest, src, len) \
do { \
size_t __len1 = (len); \ /*here , not __len=(len)*/
mdelay(0x135);\
if (__builtin_constant_p(len)) \
memcpy(dest, src, __len1); \
else \
inline_memcpy(dest, src, __len1); \
} while (0)
I disasembled lib_ring_buffer_write() and "vimdiff bad good" shows :
49c: 48 89 da mov %rbx,%rdx | 49c: 4c 89 f2 mov %r14,%rdx
here rdx is the 3rd parameter to inline_memcpy().
Thanks
zhenyu.ren
>Hi,lttng-dev
>
> I am working on rhel6(2.6.32.220) and ust is working very well.But when I use lttng-modules (after "lttng start"),the kernel reboots immediately >without any message output to console.
>
> It took me some days finding out what results in reboot. I shortcut __event_probe__##_name() before _tstruct but kernel still reboot(So what left is >metadata_printf).If I comment out "mask |= POLLIN" in lttng_metadata_ring_buffer_poll() ,kernel do not reboot. What I find out is before reboot the >callchain of lttng-consumerd thread is consumer_thread_metadata_poll()->lttng_poll_wait(wait for metadata stream)->compat_epoll_wait().
>
> I want to use poll instead as epoll in lttng-tools ,I changed lttng-tools configure file to not use epoll(undef HAVE_EPOLL),but "lttng enable-event -a -k >"failed :(Do I miss anything?)
>#lttng enable-event -a -k
>DEBUG1 [17837/18080]: Wait for client response (in thread_manage_clients() at main.c:3709)
>DEBUG1 [17837/18080]: Receiving data from client ... (in thread_manage_clients() at main.c:3754)
>DEBUG1 [17837/18080]: Nothing recv() from client... continuing (in thread_manage_clients() at main.c:3758)
>DEBUG1 [17837/18080]: Clean command context structure (in clean_command_ctx() at main.c:535)
>DEBUG1 [17837/18080]: Accepting client command ... (in thread_manage_clients() at main.c:3667)
>DEBUG1 [17837/18080]: Wait for client response (in thread_manage_clients() at main.c:3709)
>DEBUG1 [17837/18080]: Receiving data from client ... (in thread_manage_clients() at main.c:3754)
>DEBUG1 [17837/18080]: Processing client command 7 (in process_client_msg() at main.c:2579)
>DEBUG1 [17837/18080]: Getting session k-test by name (in process_client_msg() at main.c:2656)
>DEBUG1 [17837/18080]: Creating kernel session (in create_kernel_session() at main.c:2495)
>DEBUG3 [17837/18080]: Created hashtable size 4 at 0x669410 of type 1 (in lttng_ht_new() at hashtable.c:112)
>DEBUG1 [17837/18080]: Kernel session created (fd: 21) (in kernel_create_session() at kernel.c:109)
>DEBUG3 [17837/18080]: Copying tracing session consumer output in kernel session (in copy_session_consumer() at main.c:2393)
>DEBUG3 [17837/18080]: Created hashtable size 4 at 0x66a750 of type 1 (in lttng_ht_new() at hashtable.c:112)
>DEBUG3 [17837/18080]: Copy session consumer subdir /kernel (in copy_session_consumer() at main.c:2428)
>DEBUG3 [17837/18080]: mkdir() recursive /root/lttng-traces/k-test-20140222-131335 with mode 504 for uid 0 and gid 0 (in run_as_mkdir_recursive() at >runas.c:310)
>DEBUG1 [17837/18080]: Using run_as_clone (in run_as() at runas.c:293)
>lttng-sessiond: ht-cleanup.c:92: thread_ht_cleanup: Assertion `pollfd == ht_cleanup_pipe[0]' failed.
>
> It seems lttng-tools in ubuntu 12.04 is using poll,isnt it?
>
> Does anyone have any suggestions to me ?
>PS:.lttng(ust/module/tool) version is 2.3.0 and urcu version is 0.8
next reply other threads:[~2014-02-24 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <c3d1fc94-92e2-43b3-af78-6315aaa7419d@aliyun.com, a860adc0-d68a-4a1e-bbd1-775c1cf652e9@aliyun.com>
2014-02-24 9:36 ` zhenyu.ren [this message]
2014-02-24 15:08 ` Mathieu Desnoyers
2014-02-25 6:01 ` zhenyu.ren
2014-02-22 5:17 zhenyu.ren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=494972cb-79c7-4197-981c-d682306d585e@aliyun.com \
--to=zhenyu.ren@aliyun.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox