-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
illegal hardware instruction (core dumped)
when running rift init
#15
Comments
Me too! Is there a specific required OS or Python version? |
Thanks for reporting the bug! Could you kindly share the result of |
If you're on windows try getting |
I'm on macOS and Linux. @LaDoger maybe you can try this on Windows. |
➜ ~ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 23
model : 49
model name : DO-Regular
stepping : 0
microcode : 0x1000065
cpu MHz : 1996.247
cache size : 512 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm rep_good nopl cpuid extd_apicid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm svm cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext perfctr_core ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves clzero xsaveerptr wbnoinvd arat npt nrip_save umip rdpid
bugs : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed
bogomips : 3992.49
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: |
I can't even get to this point on Windows! I get: |
On Linux I get |
@AminRezaei0x443 I really need this Rift lang to work! FunC is killing me!😩😩😩 |
Right, I am getting this on macOS too (see #14). |
@merc1er Could you please run and share the output of this code? from rift.runtime.riftlib import RiftLibSetup
print(RiftLibSetup.determine_lib())
print(RiftLibSetup.get_env_info()) |
In [1]: from rift.runtime.riftlib import RiftLibSetup
...: print(RiftLibSetup.determine_lib())
https://github.com/AminRezaei0x443/ton/releases/download/v0.1.0/rift-lib-ubuntu-22.04.so
In [2]: print(RiftLibSetup.get_env_info())
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
Cell In[2], line 1
----> 1 print(RiftLibSetup.get_env_info())
File /usr/local/lib/python3.10/dist-packages/rift/runtime/riftlib.py:90, in RiftLibSetup.get_env_info(cls)
87 @classmethod
88 def get_env_info(cls):
89 return {
---> 90 "libs": cls.get_shared_libs(),
91 "glibc": cls.get_glibc_version(),
92 }
File /usr/local/lib/python3.10/dist-packages/rift/runtime/riftlib.py:69, in RiftLibSetup.get_shared_libs(cls)
67 @classmethod
68 def get_shared_libs(cls):
---> 69 ok, res = cls._call_get("ldconfig -p")
70 if not ok:
71 raise RuntimeError("Error fetching shared libraries!")
File /usr/local/lib/python3.10/dist-packages/rift/runtime/riftlib.py:57, in RiftLibSetup._call_get(cls, command)
55 @classmethod
56 def _call_get(cls, command):
---> 57 p = subprocess.Popen(
58 command,
59 stdout=subprocess.PIPE,
60 stderr=subprocess.PIPE,
61 )
62 out, err = p.communicate()
63 if p.returncode == 0:
File /usr/lib/python3.10/subprocess.py:969, in Popen.__init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize)
965 if self.text_mode:
966 self.stderr = io.TextIOWrapper(self.stderr,
967 encoding=encoding, errors=errors)
--> 969 self._execute_child(args, executable, preexec_fn, close_fds,
970 pass_fds, cwd, env,
971 startupinfo, creationflags, shell,
972 p2cread, p2cwrite,
973 c2pread, c2pwrite,
974 errread, errwrite,
975 restore_signals,
976 gid, gids, uid, umask,
977 start_new_session)
978 except:
979 # Cleanup if the child failed starting.
980 for f in filter(None, (self.stdin, self.stdout, self.stderr)):
File /usr/lib/python3.10/subprocess.py:1845, in Popen._execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, gid, gids, uid, umask, start_new_session)
1843 if errno_num != 0:
1844 err_msg = os.strerror(errno_num)
-> 1845 raise child_exception_type(errno_num, err_msg, err_filename)
1846 raise child_exception_type(err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'ldconfig -p' |
It's weird. Try to run this command so the core dump includes sudo sysctl -w kernel.core_uses_pid=1 System should dump the core under a file named
Change the layout to
Share the result so I can assist further. If you have issues with |
No file was created by the command: ➜ ~ sudo sysctl -w kernel.core_uses_pid=1
kernel.core_uses_pid = 1 |
By the way, I am using a fresh install of Ubuntu 22 on a Digital Ocean server. If that's easier, you can either spin up your own or I can give you access to mine (it's fresh, almost nothing installed) if give me an SSH public key. Also, I've no idea of how Rift works, but seems like it is doing a lot of low level system calls. So it would probably be best to have it dockerized. |
Yes, that command just does the configuration. You should run |
Ah ok. I am unable to run ➜ rift sudo sysctl -w kernel.core_uses_pid=1
kernel.core_uses_pid = 1
➜ rift rift init
[1] 37332 illegal hardware instruction (core dumped) rift init |
Didn't it create a file in the directory you were working? |
Run this: |
➜ ~ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E |
You can find the core at |
This issue is now fixed in the current release. Run |
Great! Thanks! I can confirm upgrading rift fixes the illegal hardware issue. I can probably close this issue, however when compiling the contract with ➜ project git:(main) rift build contracts/bare_template.py
Building contracts/bare_template.py from bare-template project ...
Traceback (most recent call last):
File "/usr/local/bin/rift", line 8, in <module>
sys.exit(entry())
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/rift/cli/commands/build.py", line 55, in build
config.contracts[target],
KeyError: 'contracts/bare_template.py' |
Great, so this issue is resolved. The other issue you mentioned is not an error. You should provide a target name, not a target path. Use:
And it will work. You can use |
Closing the issue as It's resolved, Thanks for your help. I will also try to output better message for the new error you shared. |
When running
rift init
on Ubuntu 22 (Python 3.10), I am getting the following error:Could you specify what environment is supposed to run on?
The text was updated successfully, but these errors were encountered: