-
Notifications
You must be signed in to change notification settings - Fork 100
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
Badly coded search filters can hang the sympa_msg.pl process... #964
Comments
Jun 17 08:44:46 sega sympa_msg[743]: err main::#243 > Sympa::Spindle::spin#95 > Sympa::Spindle::DoCommand::_twist#120 > Sympa::Spindle::spin#95 > Sympa::Request::Handler::confirm::_twist#57 > Sympa::Spindle::spin#95 > Sympa::Spindle::AuthorizeMessage::_twist#106 > Sympa::Scenario::authz#407 > (eval)#407 > Sympa::Scenario::ANON#22 > Sympa::Scenario::do_search#1293 > Sympa::DatabaseDriver::MySQL::connect#58 > Sympa::Database::connect#157 Can't connect to Database Sympa::DatabaseDriver::MySQL <db_host=localhost;db_name=sympa;db_user=sympa>: Access denied for user 'sympa'@'localhost' (using password: YES) after this no processing... |
Hi @skunktoy , |
By hanging I mean as soon as it throws this error, it stops all processing : no mail in sympa/spool/msg is processed and no new log information is generated. |
|
If sympa_msg.pl is still running, run strace -p to see what the process is doing. |
Additionally please check these things:
|
So I created a situation on my test box where this can happen, and here is end of the strace -fp for sympa_msg.pl after it hits this issue and stops ... connect(7, {sa_family=AF_UNIX, sun_path="/tmp/mysql.sock"}, 110) = 0 then it keeps looping with this 0x7ffcc6a56910) = 0 Matt |
output of pid file in spool/tmp Use of uninitialized value in pattern match (m//) at /home/sympa/bin/Conf.pm line 1675, line 8. |
When it is hanging, and I wait a while and try to send another message, it ends up sitting in spool/msg and not being processed... Matt |
Are there additional logs, new contents |
So the following is generated with a second message, which it never seems to get to since it keeps bombing out on the original one... rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 0x7ffc024f4ee0) = 0 Use of uninitialized value in pattern match (m//) at /home/sympa/bin/Conf.pm line 1675, line 8. [root@testvax.emich.edu:/home/sympa/spool/msg]# ls -alF |
Are there additional logs? |
From the strace results, it appears that sympa_msg.pl simply sleeps. According to the code below, if Sympa's process failed to connect to the database, it repeatedly retries, with an increasing interval of 60 seconds, 70 seconds and so on. sympa/src/lib/Sympa/Database.pm Lines 170 to 177 in 0fa5376
This is considered normal behavior of Sympa. |
Badly coded search filters can hang the sympa_msg.pl process, it sends a note the listmaster(s) about the database being unreachable, and then hangs.
Version
sympa-6.2.56 running on redhat ES 7
Installation method
from source
Expected behavior
Would expect it to error out, or restart sympa_msg.pl ?
Actual behavior
sympa_msg.pl just hangs after hitting this issue, so that you either have to find and fix the issue or dump that particular email from the msg spool.
Additional information
/home/sympa/etc/search_filters/listname_senders.sql code example, if it has the wrong info (ie passwd boom)
sql_named_filter_query
db_type mysql
db_name sympa
db_host localhost
db_user sympa
db_passwd notapassword
statement SELECT count(*) as c FROM mail_aliases_temp INNER JOIN subscriber_table ON subscriber_table.user_subscriber=mail_aliases_temp.zimbraMailCanonicalAddress WHERE subscriber_table.list_subscriber=[listname] AND mail_aliases_temp.alias=[sender]
The text was updated successfully, but these errors were encountered: