Opened 4 years ago

Closed 4 years ago

#32361 closed Bug (invalid)

runsslserver crash without message

Reported by: salvatoregiardina88 Owned by: nobody
Component: Uncategorized Version: 2.2
Severity: Normal Keywords: runsslserver crash messahe
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello,
I'm quite new of Python and Django, but I wasn't able to find this issue in the list and solve it.

I'm using Django in a Godaddy server, and certbot for ssl certificate.
I have a simple website with a page that refresh data in a table from sqlite3 each 10 seconds (get_more_tables.html is the page used to get data to append to the table of ui-tables.html page).

After 5-10min max it exit without any message, see below:

https://gm1.ggpht.com/jJjm7rwAdJ90NJYF-sMlFEw7U-WtPii4bSUtHjPS9D7nRRXmD-Yjt1_bQkQ7oX6kynNv3miQtzsz9-stML8LH0VY8ALXITa6Htyo7bMDi-HMRq1_xQ5SUq0bk4q4rlv34E2xvfV2WqSrT3vB1Sexawuv9DfFJOtMypKNHo_ENLAVYpR9I8_tJ7_uEfdUiPq17GfzcF8ubBBiy3t0vPxy_12kBdC2oN1LMvzbvzMrUA_aHSX0vSC45s1FelS4q5afCb72aicEpaujx-7NtMO8h799Er429Zn50tYdJfXuSl2ZZi6mVGQlavxeOgrGdguAgd96DqA4fwSyMZgtbmOIGl9QkP0H3z8tSA0dWjclfhM5FnubCIrCu1CPj3IHFeyCwhgJYZbcZnWnTNSlIeeue-MTYyTTUpGUSNyhzwpFOhWDocptxv20pYlWS3Ug07q_Zz1OT-v78XVfOQ2mw67fqkJl60WB4uCH9I6nv43i8IZeBVUoR9b0BQW2MXh47rl9qTsKxU_dU003gUiwCkwKelb22ncOejNuwMl-4gn0uklMZNdhkxqm3Ivd-mG61gE4nlALu7xxSFEBjHr2bqwF41NyEUbK7RCC6wSAxbN7ptEUP1XuixZYBQTy0fWA3vPg3Fuu8gEPIf4HOhJlDBEF3hWWZ8ivgSYQ6WE9F8k8zkxWK2eyRqqhRFLgp5r55eJ4kacOegx61ZMyecf48czU85FejqdoPGiY1--HbYiRXUEK1VRdHJrefp5B3GRHopLARHS1-A=s0-l75-ft-l75-ft

I've used the command:

python3 -u -m trace -t manage.py runsslserver 0:443 --certificate [PATH]/certificate.pem --key [PATH]/key.pem >> ./python_error.log

and the result (96Mb) is here:[ https://drive.google.com/file/d/1M4JgVIUClhjZgZHyjeoSdfvp5xwPUeuo/view?usp=sharing]

for easier reference, these are the last rows from where I think the error starts:

 --- modulename: os, funcname: fsencode
os.py(810):         filename = fspath(filename)  # Does type-checking of `filename`.
os.py(811):         if isinstance(filename, str):
os.py(812):             return filename.encode(encoding, errors)
subprocess.py(1735):                         for k, v in env.items():
subprocess.py(1736):                             k = os.fsencode(k)
 --- modulename: os, funcname: fsencode
os.py(810):         filename = fspath(filename)  # Does type-checking of `filename`.
os.py(811):         if isinstance(filename, str):
os.py(812):             return filename.encode(encoding, errors)
subprocess.py(1737):                             if b'=' in k:
subprocess.py(1739):                             env_list.append(k + b'=' + os.fsencode(v))
 --- modulename: os, funcname: fsencode
os.py(810):         filename = fspath(filename)  # Does type-checking of `filename`.
os.py(811):         if isinstance(filename, str):
os.py(812):             return filename.encode(encoding, errors)
subprocess.py(1735):                         for k, v in env.items():
subprocess.py(1742):                     executable = os.fsencode(executable)
 --- modulename: os, funcname: fsencode
os.py(810):         filename = fspath(filename)  # Does type-checking of `filename`.
os.py(811):         if isinstance(filename, str):
os.py(812):             return filename.encode(encoding, errors)
subprocess.py(1743):                     if os.path.dirname(executable):
 --- modulename: posixpath, funcname: dirname
posixpath.py(152):     p = os.fspath(p)
posixpath.py(153):     sep = _get_sep(p)
 --- modulename: posixpath, funcname: _get_sep
posixpath.py(42):     if isinstance(path, bytes):
posixpath.py(43):         return b'/'
posixpath.py(154):     i = p.rfind(sep) + 1
posixpath.py(155):     head = p[:i]
posixpath.py(156):     if head and head != sep*len(head):
posixpath.py(157):         head = head.rstrip(sep)
posixpath.py(158):     return head
subprocess.py(1744):                         executable_list = (executable,)
subprocess.py(1750):                     fds_to_keep = set(pass_fds)
subprocess.py(1751):                     fds_to_keep.add(errpipe_write)
subprocess.py(1752):                     self.pid = _posixsubprocess.fork_exec(
subprocess.py(1753):                             args, executable_list,
subprocess.py(1754):                             close_fds, tuple(sorted(map(int, fds_to_keep))),
subprocess.py(1755):                             cwd, env_list,
subprocess.py(1756):                             p2cread, p2cwrite, c2pread, c2pwrite,
subprocess.py(1757):                             errread, errwrite,
subprocess.py(1758):                             errpipe_read, errpipe_write,
subprocess.py(1759):                             restore_signals, start_new_session,
subprocess.py(1760):                             gid, gids, uid, umask,
subprocess.py(1761):                             preexec_fn)
subprocess.py(1752):                     self.pid = _posixsubprocess.fork_exec(
subprocess.py(1762):                     self._child_created = True
subprocess.py(1765):                     os.close(errpipe_write)
subprocess.py(1767):                 self._close_pipe_fds(p2cread, p2cwrite,
subprocess.py(1768):                                      c2pread, c2pwrite,
subprocess.py(1769):                                      errread, errwrite)
subprocess.py(1767):                 self._close_pipe_fds(p2cread, p2cwrite,
 --- modulename: subprocess, funcname: _close_pipe_fds
subprocess.py(1208):         devnull_fd = getattr(self, '_devnull', None)
subprocess.py(1210):         with contextlib.ExitStack() as stack:
 --- modulename: contextlib, funcname: __init__
contextlib.py(390):         self._exit_callbacks = deque()
 --- modulename: contextlib, funcname: __enter__
contextlib.py(468):         return self
subprocess.py(1211):             if _mswindows:
subprocess.py(1219):                 if p2cread != -1 and p2cwrite != -1 and p2cread != devnull_fd:
subprocess.py(1221):                 if c2pwrite != -1 and c2pread != -1 and c2pwrite != devnull_fd:
subprocess.py(1223):                 if errwrite != -1 and errread != -1 and errwrite != devnull_fd:
subprocess.py(1226):             if devnull_fd is not None:
 --- modulename: contextlib, funcname: __exit__
contextlib.py(471):         received_exc = exc_details[0] is not None
contextlib.py(475):         frame_exc = sys.exc_info()[1]
contextlib.py(476):         def _fix_exception_context(new_exc, old_exc):
contextlib.py(492):         suppressed_exc = False
contextlib.py(493):         pending_raise = False
contextlib.py(494):         while self._exit_callbacks:
contextlib.py(508):         if pending_raise:
contextlib.py(517):         return received_exc and suppressed_exc
subprocess.py(1230):         self._closed_child_pipe_fds = True
subprocess.py(1773):                 errpipe_data = bytearray()
subprocess.py(1775):                     part = os.read(errpipe_read, 50000)
subprocess.py(1776):                     errpipe_data += part
subprocess.py(1777):                     if not part or len(errpipe_data) > 50000:
subprocess.py(1781):                 os.close(errpipe_read)
subprocess.py(1783):             if errpipe_data:
 --- modulename: subprocess, funcname: __enter__
subprocess.py(1011):         return self
subprocess.py(350):         try:
subprocess.py(351):             return p.wait(timeout=timeout)
 --- modulename: subprocess, funcname: wait
subprocess.py(1182):         if timeout is not None:
subprocess.py(1184):         try:
subprocess.py(1185):             return self._wait(timeout=timeout)
 --- modulename: subprocess, funcname: _wait
subprocess.py(1885):             if self.returncode is not None:
subprocess.py(1888):             if timeout is not None:
subprocess.py(1911):                 while self.returncode is None:
subprocess.py(1912):                     with self._waitpid_lock:
subprocess.py(1913):                         if self.returncode is not None:
subprocess.py(1915):                         (pid, sts) = self._try_wait(0)
 --- modulename: subprocess, funcname: _try_wait
subprocess.py(1872):             try:
subprocess.py(1873):                 (pid, sts) = os.waitpid(self.pid, wait_flags)
Validating models...

January 18, 2021 - 10:15:47
Django version 2.2.10, using settings 'core.settings'
Starting development server at https://0:443/
Using SSL certificate: /etc/letsencrypt/live/mystockscans.com/fullchain.pem
Using SSL key: /etc/letsencrypt/live/mystockscans.com/privkey.pem
Quit the server with CONTROL-C.
subprocess.py(1880):             return (pid, sts)
subprocess.py(1919):                         if pid == self.pid:
subprocess.py(1920):                             self._handle_exitstatus(sts)
 --- modulename: subprocess, funcname: _handle_exitstatus
subprocess.py(1830):             if _WIFSTOPPED(sts):
subprocess.py(1833):                 self.returncode = waitstatus_to_exitcode(sts)
subprocess.py(1911):                 while self.returncode is None:
subprocess.py(1921):             return self.returncode
 --- modulename: subprocess, funcname: __exit__
subprocess.py(1014):         if self.stdout:
subprocess.py(1016):         if self.stderr:
subprocess.py(1018):         try:  # Flushing a BufferedWriter may raise an error
subprocess.py(1019):             if self.stdin:
subprocess.py(1022):             if exc_type == KeyboardInterrupt:
subprocess.py(1039):             self.wait()
 --- modulename: subprocess, funcname: wait
subprocess.py(1182):         if timeout is not None:
subprocess.py(1184):         try:
subprocess.py(1185):             return self._wait(timeout=timeout)
 --- modulename: subprocess, funcname: _wait
subprocess.py(1885):             if self.returncode is not None:
subprocess.py(1886):                 return self.returncode
 --- modulename: subprocess, funcname: __del__
subprocess.py(1042):         if not self._child_created:
subprocess.py(1045):         if self.returncode is None:
subprocess.py(1051):         self._internal_poll(_deadstate=_maxsize)
 --- modulename: subprocess, funcname: _internal_poll
subprocess.py(1844):             if self.returncode is None:
subprocess.py(1867):             return self.returncode
subprocess.py(1052):         if self.returncode is None and _active is not None:
autoreload.py(226):         if exit_code != 3:
autoreload.py(227):             return exit_code
autoreload.py(601):             sys.exit(exit_code)
autoreload.py(602):     except KeyboardInterrupt:
base.py(324):         except Exception as e:
base.py(335):             try:
base.py(336):                 connections.close_all()
 --- modulename: utils, funcname: close_all
utils.py(219):         for alias in self:
 --- modulename: utils, funcname: __iter__
utils.py(213):         return iter(self.databases)
utils.py(220):             try:
utils.py(221):                 connection = getattr(self._connections, alias)
utils.py(224):             connection.close()
 --- modulename: base, funcname: close
base.py(244):         self.validate_thread_sharing()
 --- modulename: base, funcname: validate_thread_sharing
base.py(541):         if not (self.allow_thread_sharing or self._thread_ident == _thread.get_ident()):
 --- modulename: base, funcname: allow_thread_sharing
base.py(521):         with self._thread_sharing_lock:
base.py(522):             return self._thread_sharing_count > 0
base.py(248):         if not self.is_in_memory_db():
 --- modulename: base, funcname: is_in_memory_db
base.py(367):         return self.creation.is_in_memory_db(self.settings_dict['NAME'])
 --- modulename: creation, funcname: is_in_memory_db
creation.py(12):         return database_name == ':memory:' or 'mode=memory' in database_name
base.py(249):             BaseDatabaseWrapper.close(self)
 --- modulename: base, funcname: close
base.py(279):         self.validate_thread_sharing()
 --- modulename: base, funcname: validate_thread_sharing
base.py(541):         if not (self.allow_thread_sharing or self._thread_ident == _thread.get_ident()):
 --- modulename: base, funcname: allow_thread_sharing
base.py(521):         with self._thread_sharing_lock:
base.py(522):             return self._thread_sharing_count > 0
base.py(280):         self.run_on_commit = []
base.py(285):         if self.closed_in_transaction or self.connection is None:
base.py(286):             return
utils.py(219):         for alias in self:

Change History (1)

comment:1 by Mariusz Felisiak, 4 years ago

Resolution: invalid
Severity: Release blockerNormal
Status: newclosed

Thanks for the report, however runsslserver is not a part of Django itself.

Closing per TicketClosingReasons/UseSupportChannels.

Note: See TracTickets for help on using tickets.
Back to Top