Closed 0x3c3e closed 5 years ago
A segmentation fault should never be expected behavior :-O Do you have a backtrace? I'll try to look into this soon.
Hi again @saghul, here it is:
import asyncio
import aiodns
import faulthandler
faulthandler.enable()
loop = asyncio.get_event_loop() resolver = aiodns.DNSResolver(loop=loop)
async def query(name, query_type): return await resolver.query(name, query_type)
coro = query('something.onion', 'NS') # actually any DNS record (e.g. A, CNAME, MX) result = loop.run_until_complete(coro)
* _segmentation fault:_
Fatal Python error: Segmentation fault
Current thread 0x{addr} (most recent call first):
File "/home/{user}/.pyenv/versions/{env}/lib/python3.7/site-packages/pycares/init.py", line 519 in _do_query
File "/home/{user}/.pyenv/versions/{env}/lib/python3.7/site-packages/pycares/init.py", line 505 in query
File "/home/{user}/.pyenv/versions/{env}/lib/python3.7/site-packages/aiodns/init.py", line 79 in query
File "test.py", line 11 in query
File "/home/{user}/.pyenv/versions/3.7.4/lib/python3.7/asyncio/events.py", line 88 in _run
File "/home/{user}/.pyenv/versions/3.7.4/lib/python3.7/asyncio/base_events.py", line 1771 in _run_once
File "/home/{user}/.pyenv/versions/3.7.4/lib/python3.7/asyncio/base_events.py", line 534 in run_forever
File "/home/{user}/.pyenv/versions/3.7.4/lib/python3.7/asyncio/base_events.py", line 566 in run_until_complete
File "test.py", line 14 in
This should fix it: https://github.com/saghul/pycares/pull/101
I have stumbled with an issue, pseudo
.onion
TLD leads to segmentation fault. Code is simple as:Let me know if it's expected behaviour.