Hello Corentin,

thanks for the crash report.

lava-logs is crashing but the code responsible for the crash in the notification (in lava_scheduler_app/notifications.py).

Could you look at the logs and try to find a line like "[<job_id>] sending email notification to <email>" in /var/log/lava-server/django.log

I'm guessing that recipient.email_address is strange.


Rgds

Le mer. 5 déc. 2018 à 09:51, Corentin Labbe <clabbe@baylibre.com> a écrit :
Hello

I got the following crash with 2018.11 on debian stretch
dpkg -l|grep lava
ii  lava                                 2018.11-1~bpo9+1                         all          Linaro Automated Validation Architecture metapackage
ii  lava-common                          2018.11-1~bpo9+1                         all          Linaro Automated Validation Architecture common
ii  lava-coordinator                     0.1.7-1                                  all          LAVA Coordinator daemon
ii  lava-dev                             2018.11-1~bpo9+1                         all          Linaro Automated Validation Architecture developer support
ii  lava-dispatcher                      2018.11-1~bpo9+1                         amd64        Linaro Automated Validation Architecture dispatcher
ii  lava-server                          2018.11-1~bpo9+1                         all          Linaro Automated Validation Architecture server
ii  lava-server-doc                      2018.11-1~bpo9+1                         all          Linaro Automated Validation Architecture documentation
ii  lavacli                              0.9.3-1~bpo9+1                           all          LAVA XML-RPC command line interface
ii  lavapdu-client                       0.0.5-1                                  all          LAVA PDU client
ii  lavapdu-daemon                       0.0.5-1                                  all          LAVA PDU control daemon


2018-12-04 14:14:40,187   ERROR [EXIT] Unknown exception raised, leaving!
2018-12-04 14:14:40,187   ERROR string index out of range
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/lava_server/management/commands/lava-logs.py", line 193, in handle
    self.main_loop()
  File "/usr/lib/python3/dist-packages/lava_server/management/commands/lava-logs.py", line 253, in main_loop
    while self.wait_for_messages(False):
  File "/usr/lib/python3/dist-packages/lava_server/management/commands/lava-logs.py", line 287, in wait_for_messages
    self.logging_socket()
  File "/usr/lib/python3/dist-packages/lava_server/management/commands/lava-logs.py", line 433, in logging_socket
    job.save()
  File "/usr/lib/python3/dist-packages/django_restricted_resource/models.py", line 71, in save
    return super(RestrictedResource, self).save(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 796, in save
    force_update=force_update, update_fields=update_fields)
  File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 820, in save_base
    update_fields=update_fields)
  File "/usr/lib/python3/dist-packages/django/dispatch/dispatcher.py", line 191, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/usr/lib/python3/dist-packages/lava_scheduler_app/signals.py", line 139, in testjob_notifications
    send_notifications(job)
  File "/usr/lib/python3/dist-packages/lava_scheduler_app/notifications.py", line 305, in send_notifications
    title, body, settings.SERVER_EMAIL, [recipient.email_address]
  File "/usr/lib/python3/dist-packages/django/core/mail/__init__.py", line 62, in send_mail
    return mail.send()
  File "/usr/lib/python3/dist-packages/django/core/mail/message.py", line 342, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 107, in send_messages
    sent = self._send(message)
  File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 120, in _send
    recipients = [sanitize_address(addr, encoding) for addr in email_message.recipients()]
  File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 120, in <listcomp>
    recipients = [sanitize_address(addr, encoding) for addr in email_message.recipients()]
  File "/usr/lib/python3/dist-packages/django/core/mail/message.py", line 161, in sanitize_address
    address = Address(nm, addr_spec=addr)
  File "/usr/lib/python3.5/email/headerregistry.py", line 42, in __init__
    a_s, rest = parser.get_addr_spec(addr_spec)
  File "/usr/lib/python3.5/email/_header_value_parser.py", line 1988, in get_addr_spec
    token, value = get_local_part(value)
  File "/usr/lib/python3.5/email/_header_value_parser.py", line 1800, in get_local_part
    if value[0] in CFWS_LEADER:
IndexError: string index out of range
2018-12-04 14:14:40,211    INFO [EXIT] Disconnect logging socket and process messages
2018-12-04 14:14:40,211   DEBUG [EXIT] unbinding from 'tcp://0.0.0.0:5555'
2018-12-04 14:14:50,221    INFO [EXIT] Closing the logging socket: the queue is empty

Regards
_______________________________________________
Lava-users mailing list
Lava-users@lists.lavasoftware.org
https://lists.lavasoftware.org/mailman/listinfo/lava-users


--
Rémi Duraffort
LAVA Team