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

Revert dmutex_init code in driver/mutex.c back to the old code in 30fc39... #12

Closed
wants to merge 1 commit into from

Conversation

msabramo
Copy link
Contributor

...c8 without DEFINE_SEMAPHORE.

Fixes GH-11.

@dtrace4linux
Copy link
Owner

Why did you revert the change? I deliberately had to do this because of issues in older kernels.

@msabramo
Copy link
Contributor Author

Because it doesn't seem to work on the kernel that I am on. I'm not very familiar with kernel development. I thought that maybe the DEFINE_SEMAPHORE was something in newer kernels because I don't remember running into this yesterday on Ubuntu 11, but I could be very wrong (or maybe I used a release tarball yesterday rather than pulling from the head of the git repo?). On Ubuntu 10, I can't find DEFINE_SEMAPHORE anywhere.

You should take all of my pull requests with a grain of salt, as I don't know much about kernel development and I could be hacking around to solve problems that are actually problems in my config.

@dtrace4linux
Copy link
Owner

Marc - really appreciate the effort you have taken here on this - you
found a silly/hard-for-me-to-reproduce issue in the dt_names.c stuff.

I am new to github and git in general, so apologies if it looks like I
am shutting you out or not obeying commit/pull protocols - just let me
know if you think I am doing something wrong.

I will build on Ubuntu 10.04 to verify the issue you see, might be a
side effect of some other breakage.

On 29 February 2012 21:04, Marc Abramowitz
reply@reply.github.com
wrote:

Because it doesn't seem to work on the kernel that I am on. I'm not very familiar with kernel development. I thought that maybe the DEFINE_SEMAPHORE was something in newer kernels because I don't remember running into this yesterday on Ubuntu 11, but I could be very wrong. On Ubuntu 10, I can't find DEFINE_SEMAPHORE anywhere.

You should take all of my pull requests with a grain of salt, as I don't know much about kernel development and I could be hacking around to solve problems that are actually problems in my config.


Reply to this email directly or view it on GitHub:
#12 (comment)

@msabramo
Copy link
Contributor Author

Hi Paul!

Glad that some of my changes were helpful! I'm not a git expert by any means, but I might be able to give you a pointer here or there as I've done a fair amount of git and pull requests on GitHub.

Thanks again for your work on DTrace for Linux! This must've been a monumental effort.

@msabramo
Copy link
Contributor Author

msabramo commented Mar 1, 2012

Yesterday on Ubuntu 11, I wasn't using git -- I used dtrace-20120225.tar.gz. But I just tested building from git on Ubuntu 11 and it worked.

marca@ubuntu-11:~/src/dtrace4linux/github/linux$ grep DEFINE_SEMAPHORE /usr/src/linux-headers-3.0.0-14-generic/include/linux/semaphore.h 
#define DEFINE_SEMAPHORE(name)  \

whereas on Ubuntu 10 with the 2.6.32-38-generic kernel:

marca@ubuntu-10:~/src/dtrace4linux/newlinux/tests$ grep SEMAPHORE /usr/src/linux-headers-2.6.32-38-generic/include/linux/semaphore.h 
#ifndef __LINUX_SEMAPHORE_H
#define __LINUX_SEMAPHORE_H
#define __SEMAPHORE_INITIALIZER(name, n)                \
    struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1)
    *sem = (struct semaphore) __SEMAPHORE_INITIALIZER(*sem, val);
#endif /* __LINUX_SEMAPHORE_H */

marca@ubuntu-10:~/src/dtrace4linux/newlinux/tests$ ack-grep DEFINE_SEMAPHORE /usr/src /usr/include
(Nothing)

No DEFINE_SEMAPHORE.

It looks like it used to be called DECLARE_MUTEX (see http://lwn.net/Articles/304725/).

@msabramo
Copy link
Contributor Author

msabramo commented Mar 1, 2012

I'm closing this, because I think pull #19 (commit eb33154) is a better change.

@msabramo msabramo closed this Mar 1, 2012
azat added a commit to azat-archive/dtrace4linux that referenced this pull request Aug 7, 2013
I see this is happens in gdb:

gdb bt:
 #0  taskq_dispatch2 (tq=0xffff88003712e600, func=0x0 <irq_stack_union>,
     arg=0x0 <irq_stack_union>, flags=0, delay=1)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/taskq.c:263
 dtrace4linux#1  0xffffffffa0369433 in timeout (
     func=func@entry=0xffffffffa035c9d5 <fasttrap_pid_cleanup_cb>,
     arg=arg@entry=0x0 <irq_stack_union>, ticks=ticks@entry=1)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/taskq.c:306
 dtrace4linux#2  0xffffffffa035c9c0 in fasttrap_pid_cleanup ()
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/fasttrap.c:505
 dtrace4linux#3  0xffffffffa035cdbf in fasttrap_provider_retire (pid=<optimized out>,
     name=0xffffffffa037eb8f "pid", name@entry=0x140ef <Address 0x140ef out of bounds>,
     mprov=mprov@entry=0) at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/fasttrap.c:1713
 dtrace4linux#4  0xffffffffa035ce08 in fasttrap_exec_exit (p=0xffff8800371d3b18)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/fasttrap.c:596
 dtrace4linux#5  0xffffffffa0358c09 in proc_exit_notifier (n=<optimized out>, code=<optimized out>,
     ptr=<optimized out>)
     at /usr/src/dtrace4linux/build-3.11.0-rc4+/driver/dtrace_linux.c:2020
 dtrace4linux#6  0xffffffff8139b2d3 in notifier_call_chain (
     nl=nl@entry=0xffffffff81634da0 <task_exit_notifier+32>, val=val@entry=0,
     v=v@entry=0xffff88007b62b040, nr_to_call=nr_to_call@entry=-1,
     nr_calls=nr_calls@entry=0x0 <irq_stack_union>) at kernel/notifier.c:93
 dtrace4linux#7  0xffffffff8105824b in __blocking_notifier_call_chain (
     nh=nh@entry=0xffffffff81634d80 <task_exit_notifier>, val=val@entry=0,
     v=0xffff88007b62b040, nr_to_call=nr_to_call@entry=-1,
     nr_calls=nr_calls@entry=0x0 <irq_stack_union>) at kernel/notifier.c:314
 dtrace4linux#8  0xffffffff81058273 in blocking_notifier_call_chain (
     nh=nh@entry=0xffffffff81634d80 <task_exit_notifier>, val=val@entry=0,
     v=<optimized out>) at kernel/notifier.c:325
 dtrace4linux#9  0xffffffff810750f5 in profile_task_exit (task=<optimized out>) at kernel/profile.c:143
 dtrace4linux#10 0xffffffff8103a3cf in do_exit ()
 dtrace4linux#11 0xffffffff8103b87c in do_group_exit ()
 dtrace4linux#12 0xffffffff81047522 in get_signal_to_deliver ()
 dtrace4linux#13 0xffffffff81002176 in do_signal ()
 dtrace4linux#14 0xffffffff810025d3 in do_notify_resume ()
 dtrace4linux#15 <signal handler called>
 dtrace4linux#16 0x00007fed3818fff8 in ?? ()

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

Successfully merging this pull request may close these issues.

Build error in driver/mutex.c: invalid storage class for function 'DEFINE_SEMAPHORE'
2 participants