Skip to content

Python 3.14 compatibility problem #1088

Description

@pixelsquared

With python 3.14 the default start method is now forkserver instead of fork.

As a test I was able to fix this by adding this to ospd.py.

multiprocessing.set_start_method('fork')

Expected behavior

For ospd-openvas to not crash when starting a scan.

Actual behavior

Traceback (most recent call last):                                                                 
  File "/usr/bin/ospd-openvas", line 8, in <module>                                                
    sys.exit(main())                                                                               
             ~~~~^^                                                                                
  File "/usr/lib/python3.14/site-packages/ospd_openvas/daemon.py", line 1307, in main              
    daemon_main('OSPD - openvas', OSPDopenvas, NotusParser())                                      
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                      
  File "/usr/lib/python3.14/site-packages/ospd/main.py", line 153, in main                         
    daemon.run()                                                                                   
    ~~~~~~~~~~^^                                                                                   
  File "/usr/lib/python3.14/site-packages/ospd/ospd.py", line 1104, in run                         
    self.start_queued_scans()                                                                      
    ~~~~~~~~~~~~~~~~~~~~~~~^^                                                                      
  File "/usr/lib/python3.14/site-packages/ospd/ospd.py", line 1141, in start_queued_scans          
    scan_process.start()                                                                           
    ~~~~~~~~~~~~~~~~~~^^                                                                           
  File "/usr/lib/python3.14/multiprocessing/process.py", line 121, in start                        
    self._popen = self._Popen(self)                                                                
                  ~~~~~~~~~~~^^^^^^                                                                
  File "/usr/lib/python3.14/multiprocessing/context.py", line 224, in _Popen                       
    return _default_context.get_context().Process._Popen(process_obj)                              
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^                              
  File "/usr/lib/python3.14/multiprocessing/context.py", line 300, in _Popen                       
    return Popen(process_obj)                                                                      
  File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 35, in __init__             
    super().__init__(process_obj)                                                                  
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^                                                                  
  File "/usr/lib/python3.14/multiprocessing/popen_fork.py", line 20, in __init__                   
    self._launch(process_obj)                                                                      
    ~~~~~~~~~~~~^^^^^^^^^^^^^                                                                      
  File "/usr/lib/python3.14/multiprocessing/popen_forkserver.py", line 47, in _launch              
    reduction.dump(process_obj, buf)                                                               
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^                                                               
  File "/usr/lib/python3.14/multiprocessing/reduction.py", line 60, in dump                        
    ForkingPickler(file, protocol).dump(obj)                                                       
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^                                                       
TypeError: cannot pickle '_thread.lock' object                                                     
when serializing dict item '_lock'                                                                 
when serializing redis.event.EventDispatcher state                                                 
when serializing redis.event.EventDispatcher object                                                
when serializing dict item '_event_dispatcher'                                                     
when serializing redis.client.Redis state                                                          
when serializing redis.client.Redis object                                                         
when serializing dict item 'ctx'                                                                   
when serializing ospd_openvas.db.MainDB state                                                      
when serializing ospd_openvas.db.MainDB object                                                     
when serializing dict item 'main_db'                                                               
when serializing ospd_openvas.daemon.OSPDopenvas state                                             
when serializing ospd_openvas.daemon.OSPDopenvas object                                            
when serializing tuple item 0                                                                      
when serializing method reconstructor arguments                                                    
when serializing method object                                                                     
when serializing dict item '_target'                                                               
when serializing multiprocessing.context.Process state                                             
when serializing multiprocessing.context.Process object                                            
Exception ignored in atexit callback <function exit_cleanup at 0x7f4e079035e0>:                    

Steps to reproduce

  1. Install ospd-openvas with python 3.14
  2. Install GSA, GVM, etc
  3. Run a scan

GVM versions

gsa: (gsad --version)

$ gsad --version
Greenbone Security Assistant Deamon 24.14.2~git-3fe7550-master

gvm: (gvmd --version)

$ gvmd --version
Greenbone Vulnerability Manager 26.15.0
Manager DB revision 266
Copyright (C) 2009-2025 Greenbone AG
License: AGPL-3.0-or-later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

openvas-scanner: (openvas --version)

$ openvas --version
OpenVAS 23.38.0
gvm-libs 22.35.4
Most new code since 2005: (C) 2024 Greenbone AG
Nessus origin: (C) 2004 Renaud Deraison <deraison@nessus.org>
License GPLv2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gvm-libs:
22.35.4

Environment

Operating system:

> cat /etc/lsb-release
DISTRIB_ID=cachyos
DISTRIB_RELEASE="rolling"
DISTRIB_DESCRIPTION="CachyOS"

Installation method / source: source installation

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions