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

Correct SIGINT and SIGQUIT termination in debug mode #1308

Closed
wants to merge 1 commit into from

Conversation

EllezDi
Copy link

@EllezDi EllezDi commented Oct 7, 2015

If server starts without -m option, then SIGINT and SIGQUIT signal handlers doesn't init.

The -m option for memory cleanup then correctly processed in sig_fatal function.

@alandekok
Copy link
Member

Why is this "correct"? The SIGINT and SIGQUIT handlers shouldn't be set when -m isn't used.

@EllezDi
Copy link
Author

EllezDi commented Oct 7, 2015

On my debian 8.2 radiusd -XXX didn't terminate on Ctrl-C (terminates with radiusd -mXXX).
So, when I explicitly sets the fr_set_signal(SIGINT, sig_fatal); - it does.
My thoughts - this is because no one handles the SIGINT signal.
Maybe I'm wrong ?

@alandekok
Copy link
Member

If there is no signal handler for CTRL-C, then the process should quit. It works fine on my system when using radiusd -X and CTRL-C.

@alandekok alandekok closed this Oct 7, 2015
@EllezDi
Copy link
Author

EllezDi commented Oct 7, 2015

I can't believe. Magic! After your post it works !! (recompiled distro 2 times). =) Thanks =)

@arr2036
Copy link
Member

arr2036 commented Oct 7, 2015

I've noticed some modules like rlm_ruby, register their own signal handlers which can cause this to happen.

@EllezDi
Copy link
Author

EllezDi commented Oct 7, 2015

I found it. When rlm_sql_oracle loads - it does not terminates on SIGINT. Only with SIGQUIT.
Without rlm_sql - works fine for both signals.

@arr2036
Copy link
Member

arr2036 commented Oct 7, 2015

We should probably try to remove any registered signal handlers (that we didn't add) after module instantiation. @alandekok thoughts?

@arr2036 arr2036 reopened this Oct 7, 2015
@alandekok
Copy link
Member

While I thing it's stupid for libraries to register signal handlers, I'm not sure it's worth adding more code to the server to work around stupid crap.

@alandekok alandekok closed this Oct 7, 2015
arr2036 added a commit that referenced this pull request Oct 7, 2015
@arr2036 arr2036 reopened this Oct 7, 2015
@arr2036
Copy link
Member

arr2036 commented Oct 7, 2015

@EllezDi can you confirm this fixes the issue? Then i'll merge to v3.0.x?

@EllezDi
Copy link
Author

EllezDi commented Oct 8, 2015

@arr2036 on 3.0.10 - your patch didn't fixes the issue. Oracle client 12.1 x64 (db 10 or 11)
export BEQUEATH_DETACH=YES - still didn't work
As I see in docs, bequeathed connections are all local. So for Net8 it may not work.

@arr2036 arr2036 closed this in e64cee5 Oct 8, 2015
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.

None yet

3 participants