Project

General

Profile

Actions

Bug #7565

closed

Timeline falls flat on certain query

Added by Pavel Kácha over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Development - GUI
Target version:
Start date:
03/02/2022
Due date:
% Done:

0%

Estimated time:
To be discussed:

Description

And seems some contract again does not meet expectations (wrong number of args).

Query: https://mentat-hub.cesnet.cz/mentat/timeline/search?dt_from=2022-02-23+09%3A00%3A00&dt_to=2022-03-02+09%3A00%3A00&source_addrs=&source_ports=&detectors=cz.cesnet.au1.warden_filer&limit=100&submit=Hledat

Traceback:

Message type: ERROR
Location:     /var/mentat/venv/lib/python3.7/site-packages/vial/app.py:168
Module:       app
Function:     log_exception
Time:         2022-03-02 08:37:37,521

Message:

Exception on
/timeline/search?dt_from=2022-02-23+08%3A00%3A00&dt_to=2022-03-02+08%3A00%3A00&source_addrs=&source_ports=&detectors=cz.cesnet.au1.warden_filer&limit=100&submit=Hledat [GET]
Traceback (most recent call last):
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view
    return func(*args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/vial/view/__init__.py", line 1040, in dispatch_request
    self.custom_search(form_data)
  File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/timeline/__init__.py", line 218, in custom_search
    False
  File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/timeline/__init__.py", line 186, in _search_events_aggr
    dbtoplist = enable_toplist
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 947, in wrapped_f
    return func(other_self, *args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 983, in exc_handle_wrapper
    return func(self, *args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 1381, in search_events_aggr
    result = self.cursor.search_events_aggr(parameters, qtype = qtype, qname = qname, dbtoplist = dbtoplist)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 715, in search_events_aggr
    return self.cursor.fetchall()
  File "/var/mentat/venv/lib/python3.7/site-packages/psycopg2/extras.py", line 349, in fetchall
    return list(map(nt._make, ts))
  File "/usr/lib/python3.7/collections/__init__.py", line 407, in _make
    raise TypeError(f'Expected {num_fields} arguments, got {len(result)}')
TypeError: Expected 3 arguments, got 2


Related issues

Has duplicate Mentat - Bug #7590: /api/events/search sometimes crashes with TypeError: Expected 22 arguments, got 23ClosedRajmund Hruška06/06/2022

Actions
Blocked by Mentat - Bug #6191: Implement thread safety in eventstorage service moduleClosedPavel Kácha01/14/2020

Actions
Actions #1

Updated by Rajmund Hruška over 2 years ago

  • Related to Bug #7590: /api/events/search sometimes crashes with TypeError: Expected 22 arguments, got 23 added
Actions #2

Updated by Rajmund Hruška over 2 years ago

  • Blocked by Bug #6191: Implement thread safety in eventstorage service module added
Actions #3

Updated by Rajmund Hruška over 2 years ago

  • Related to deleted (Bug #7590: /api/events/search sometimes crashes with TypeError: Expected 22 arguments, got 23)
Actions #4

Updated by Rajmund Hruška over 2 years ago

  • Has duplicate Bug #7590: /api/events/search sometimes crashes with TypeError: Expected 22 arguments, got 23 added
Actions #5

Updated by Rajmund Hruška over 2 years ago

  • Status changed from New to In Review
  • Target version changed from Backlog to 2.10
  • % Done changed from 0 to 100

Should be fixed by #6191.

Actions #6

Updated by Rajmund Hruška over 2 years ago

  • Status changed from In Review to Feedback
  • % Done changed from 100 to 0
  • To be discussed changed from No to Yes

So, this happened:

Message type: ERROR
Location:     /var/mentat/venv/lib/python3.7/site-packages/vial/app.py:168
Module:       app
Function:     log_exception
Time:         2022-06-23 17:57:29,680

Message:

Exception on /timeline/search?dt_from=2022-06-16+17%3A00%3A00&dt_to=2022-06-23+17%3A00%3A00&source_addrs=&source_ports=&submit=Hledat [GET]
Traceback (most recent call last):
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view
    return func(*args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view
    return self.dispatch_request(*args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/vial/view/__init__.py", line 1023, in dispatch_request
    self.do_before_search(form_data)
  File "/var/mentat/venv/lib/python3.7/site-packages/hawat/blueprints/timeline/__init__.py", line 156, in do_before_search
    timeline_cfg['step']
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 947, in wrapped_f
    return func(other_self, *args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 983, in exc_handle_wrapper
    return func(self, *args, **kwargs)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 1336, in query_direct
    result = self.cursor.query_direct(raw_query, idents, params)
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 647, in query_direct
    return self.cursor.fetchall()
  File "/var/mentat/venv/lib/python3.7/site-packages/psycopg2/extras.py", line 349, in fetchall
    return list(map(nt._make, ts))
  File "/usr/lib/python3.7/collections/__init__.py", line 407, in _make
    raise TypeError(f'Expected {num_fields} arguments, got {len(result)}')
TypeError: Expected 3 arguments, got 1

So, maybe this issue wasn't fixed by #6191? Or is it possible that the changes made in #6191 were reverted? I don't know what exactly did you do, Pavel Kácha, so I can't really check it.

Actions #7

Updated by Pavel Kácha over 2 years ago

Rajmund Hruska wrote in #note-6:

So, this happened:
[...]

So, maybe this issue wasn't fixed by #6191? Or is it possible that the changes made in #6191 were reverted? I don't know what exactly did you do, Pavel Kácha, so I can't really check it.

See note 13 at #6191, and let's watch it some more.

Actions #8

Updated by Rajmund Hruška over 2 years ago

  • Status changed from Feedback to In Review
  • To be discussed deleted (Yes)
Actions #9

Updated by Pavel Kácha over 2 years ago

  • Status changed from In Review to Closed
Actions

Also available in: Atom PDF