OpenWPM icon indicating copy to clipboard operation
OpenWPM copied to clipboard

Socket Communication Issue

Open MohammadMahdiJavid opened this issue 2 years ago • 1 comments

Hi,

sometimes (randomly) not very specific patterns or something reproducible I receive BrokenPipeError

Exception in thread Thread-422:
Traceback (most recent call last):
  File "lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "lib/python3.9/threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
    
  File "openwpm/browser_manager.py", line 361, in execute_command_sequence
  task_manager.sock.store_record(
            TableName("site_visits"),
            self.curr_visit_id,
            {
                "visit_id": self.curr_visit_id,
                "browser_id": self.browser_id,
                "site_url": command_sequence.url,
                "site_rank": command_sequence.site_rank,
            },
        )

  File "storage/storage_controller.py", line 444, in store_record
    self.socket.send(
    
  File "openwpm/socket_interface.py", line 157, in send
    sent = self.sock.send(msg[totalsent:])
    
BrokenPipeError: [Errno 32] Broken pipe

What could be the underlying cause for this issue?

also this error (I thought the might be related to each other)


Exception in thread Thread-421:
Traceback (most recent call last):
  File "lib/python3.9/threading.py", line 980, in _bootstrap_inner
    self.run()
  File "lib/python3.9/threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)

  File "openwpm/browser_manager.py", line 446, in execute_command_sequence
    task_manager.sock.store_record(

  File "storage/storage_controller.py", line 444, in store_record
    self.socket.send(

  File "openwpm/socket_interface.py", line 157, in send
    sent = self.sock.send(msg[totalsent:])
ConnectionResetError: [Errno 104] Connection reset by peer

Thank you so much for all your help!

MohammadMahdiJavid avatar Jan 10 '24 08:01 MohammadMahdiJavid

That's curious as I've primarily seen broken sockets when talking to the WebExtension after the browser has closed down. Having that happen in the communication between TaskManager and StorageController is concerning.

Are there any error messages from the StorageController before this happens?

vringar avatar Jan 11 '24 15:01 vringar