This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fenrrir
Recipients fenrrir, methane
Date 2018-07-11.13:27:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1531315633.19.0.56676864532.issue34087@psf.upfronthosting.co.za>
In-reply-to
Content
Running with `-X faulthandler`

Fatal Python error: Segmentation fault

Current thread 0x00007fff89cf2380 (most recent call first):
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/urls/resolvers.py", line 526 in resolve
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/urls/resolvers.py", line 500 in resolve
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/base.py", line 113 in _get_response
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/reversion/views.py", line 43 in do_revision_view
  File "/Users/rodrigo/root/lib/python3.7/site-packages/reversion/middleware.py", line 51 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/utils/deprecation.py", line 95 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/exception.py", line 35 in inner
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/handlers/base.py", line 81 in get_response
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 138 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 467 in request
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 404 in generic
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 332 in get
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/client.py", line 517 in get
  File "/Users/rodrigo/root/lib/python3.7/unittest/case.py", line 615 in run
  File "/Users/rodrigo/root/lib/python3.7/unittest/case.py", line 663 in __call__
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/testcases.py", line 206 in __call__
  File "/Users/rodrigo/root/lib/python3.7/unittest/suite.py", line 122 in run
  File "/Users/rodrigo/root/lib/python3.7/unittest/suite.py", line 84 in __call__
  File "/Users/rodrigo/root/lib/python3.7/unittest/runner.py", line 176 in run
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/runner.py", line 569 in run_suite
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/test/runner.py", line 603 in run_tests
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/commands/test.py", line 59 in handle
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/base.py", line 335 in execute
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/base.py", line 288 in run_from_argv
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/commands/test.py", line 26 in run_from_argv
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/__init__.py", line 365 in execute
  File "/Users/rodrigo/root/lib/python3.7/site-packages/django/core/management/__init__.py", line 371 in execute_from_command_line
  File "manage.py", line 10 in <module>
Segmentation fault: 11

The Django code:

    def resolve(self, path):
        path = str(path)  # path may be a reverse_lazy object
        tried = []
        match = self.pattern.match(path)
        if match:
            new_path, args, kwargs = match
            for pattern in self.url_patterns:
                try:
                    sub_match = pattern.resolve(new_path)
                except Resolver404 as e:
                    sub_tried = e.args[0].get('tried')
                    if sub_tried is not None:
                        tried.extend([pattern] + t for t in sub_tried)
                    else:
                        tried.append([pattern])
                else:
                    if sub_match:
                        # Merge captured arguments in match with submatch
                        sub_match_dict = dict(kwargs, **self.default_kwargs)
                        # Update the sub_match_dict with the kwargs from the sub_match.
                        sub_match_dict.update(sub_match.kwargs)
                        # If there are *any* named groups, ignore all non-named groups.
                        # Otherwise, pass all non-named arguments as positional arguments.
                        sub_match_args = sub_match.args
                        if not sub_match_dict:
                            sub_match_args = args + sub_match.args
                        return ResolverMatch(
                            sub_match.func,
                            sub_match_args,
                            sub_match_dict,
                            sub_match.url_name,
                            [self.app_name] + sub_match.app_names,
                            [self.namespace] + sub_match.namespaces,
                        )
                    tried.append([pattern]) # Segfault happens here!
            raise Resolver404({'tried': tried, 'path': new_path})
        raise Resolver404({'path': path})


According to faulthandler the segmentation fault happens on tried.append([pattern]).
History
Date User Action Args
2018-07-11 13:27:13fenrrirsetrecipients: + fenrrir, methane
2018-07-11 13:27:13fenrrirsetmessageid: <1531315633.19.0.56676864532.issue34087@psf.upfronthosting.co.za>
2018-07-11 13:27:13fenrrirlinkissue34087 messages
2018-07-11 13:27:13fenrrircreate