EXCEPTION_ACCESS_VIOLATION at 0x0 when calling dll compiled with Julia PackageCompiler - visual-studio-code

I am compiling Julia program as dll and trying to call from another program.
The Julia program is as follows (I am planning to use commented out pkg):
module pjname
# using Statistics
# using CSV
# using DataFrames
# using DSP
# # using Plots
# using Dates
# using FindPeaks1D
Base.#ccallable function function_name(slen::Cint)::Cint
println(1)
return 0
end
end # module
The program I am using to compile the code is:
using PackageCompiler
PackageCompiler.create_sysimage(; sysimage_path="./src/prog_dl.dll", script="./src/prog.jl")
and the program I call the dll is as follows:
using Libdl
libmg = dlopen("H:/julia/pjname3/src/prog_dl.dll")
function_name = dlsym(libmg, :func_name)
ccall(function_name, Cint, (Cint,), Int32(1))
I get the following error. Could someone help me to figure out this issue? I tried Julia version 1.6.5 and 1.7.0 but both of them didn't work. I am using windows and VS Code as IDE.
Please submit a bug report with steps to reproduce this fault, and any
error messages that follow (in their entirety). Thanks. Exception:
EXCEPTION_ACCESS_VIOLATION at 0x0 -- unknown function (ip:
0000000000000000) in expression starting at none:1 unknown
function (ip: 0000000000000000) function_name at
H:\julia\pjname3\src\prog_dl.dll (unknown line) top-level scope at
.\none:1 jl_toplevel_eval_flex at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:871
jl_toplevel_eval at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886
[inlined] jl_toplevel_eval_in at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined] evaluate_foreigncall at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:166
eval_rhs at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:402
step_expr! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:556
step_expr! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\interpret.jl:611
finish! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:14
finish_and_return! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:30
unknown function (ip: 0000000060da89d5) finish_stack! at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:60
unknown function (ip: 0000000060da8925)
#debug_command#83 at c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:474
debug_command at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\JuliaInterpreter\src\commands.jl:416
unknown function (ip: 0000000060dc8a09) jl_apply at
/cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703
[inlined] jl_f__call_latest at
/cygdrive/c/buildbot/worker/package_win64/build/src\builtins.c:714
#invokelatest#2 at .\essentials.jl:708 [inlined] invokelatest at .\essentials.jl:706 [inlined] our_debug_command at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\DebugAdapter\src\debugger_core.jl:67
startdebug at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\DebugAdapter\src\packagedef.jl:106
startdebugger at
c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\packages\VSCodeDebugger\src\VSCodeDebugger.jl:39
unknown function (ip: 0000000060d6bca3) jl_apply at
/cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703
[inlined] do_call at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:115
eval_value at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:204
eval_stmt_value at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:155
[inlined] eval_body at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:576
jl_interpret_toplevel_thunk at
/cygdrive/c/buildbot/worker/package_win64/build/src\interpreter.c:670
jl_toplevel_eval_flex at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:877
jl_toplevel_eval_flex at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:825
jl_toplevel_eval at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:886
[inlined] jl_toplevel_eval_in at
/cygdrive/c/buildbot/worker/package_win64/build/src\toplevel.c:929
eval at .\boot.jl:360 [inlined] include_string at .\loading.jl:1116
_include at .\loading.jl:1170 include at .\Base.jl:384 exec_options at .\client.jl:285
_start at .\client.jl:485 jfptr__start_46900.clone_1 at C:\Users\user_name\AppData\Local\Programs\Julia-1.6.5\lib\julia\sys.dll
(unknown line) jl_apply at
/cygdrive/c/buildbot/worker/package_win64/build/src\julia.h:1703
[inlined] true_main at
/cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:560
repl_entrypoint at
/cygdrive/c/buildbot/worker/package_win64/build/src\jlapi.c:702
mainCRTStartup at
/cygdrive/c/buildbot/worker/package_win64/build/cli\loader_exe.c:51
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 14028713 (Pool: 14021110; Big: 7603); GC: 16 The terminal
process
"C:\Users\user_name\AppData\Local\Programs\Julia-1.6.5\bin\julia.exe
'--color=yes', '--startup-file=no', '--history-file=no',
'--project=h:\julia\pjname3',
'c:\Users\user_name.vscode\extensions\julialang.language-julia-1.5.8\scripts\debugger\run_debugger.jl',
'\.\pipe\vsc-jl-dbg-7bbf4da0-9e5b-4d64-8fbb-db76fd01a2af',
'\.\pipe\vsc-jl-cr-e192e8b6-1dd8-46c2-90a6-1074d122bd3c'" terminated
with exit code: 1.

Related

Sympy not found in current path but it´s installed

I had been working all afternoon with Julia when suddenly SymPy stopped working. It tells me that I should add SYMPA but SymPy is already there. The weirdest thing of all is this only happens inside of Visual Studio Code, as the Julia program can perfectly run SymPy. This is the error that pops up whenever I try to run using SymPy in VSC
ERROR: ArgumentError: Package Sympy not found in current path.
- Run `import Pkg; Pkg.add("Sympy")` to install the Sympy package.
Stacktrace:
[1] macro expansion
# .\loading.jl:1163 [inlined]
[2] macro expansion
# .\lock.jl:223 [inlined]
[3] require(into::Module, mod::Symbol)
# Base .\loading.jl:1144
[4] eval
# .\boot.jl:368 [inlined]
[5] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
# Base .\loading.jl:1428
[6] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
# Base .\essentials.jl:729
[7] invokelatest(::Any, ::Any, ::Vararg{Any})
# Base .\essentials.jl:726
[8] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:233
[9] (::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:157
[10] withpath(f::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\repl.jl:249
[11] (::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:155
[12] hideprompt(f::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\repl.jl:38
[13] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:126
[14] with_logstate(f::Function, logstate::Any)
# Base.CoreLogging .\logging.jl:511
[15] with_logger
# .\logging.jl:623 [inlined]
[16] (::VSCodeServer.var"#63#67"{VSCodeServer.ReplRunCodeRequestParams})()
# VSCodeServer c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:225
[17] #invokelatest#2
# .\essentials.jl:729 [inlined]
[18] invokelatest(::Any)
# Base .\essentials.jl:726
[19] macro expansion
# c:\Users\humbe\.vscode\extensions\julialang.language-julia-1.38.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
[20] (::VSCodeServer.var"#61#62")()
# VSCodeServer .\task.jl:484
This sounds like a problem with the environment you are using. What is it saying in the bottom left of VSCode about the environment?
If it says there something like "Julia 1.8.3", you are using the overall installation. I could imagine that this is not the case.
In every folder you can create a specific environment. Go into the package mode by typing ] in the REPL. Then activate the "folder" environment like this
(#v1.8) pkg> activate .
and your prompt will change to
(your_folder) pkg>
This is strongly encouraged by the way.
You can then in the package mode (]) see the installed packages (st) and add (add [package]) and remove some ( rm [package]) as well.

Bitbake do image failure

I have been successfully building an image for many days now. I add all of my custom files to GitLab. I have not knowingly made changes to my build environment. I am now getting errors can can not build my image. Can anyone understand what this error is telling me? I have tried looking it up but nothing seems to work.
Initialising tasks: 100% |##################################################################################################################################################################| Time: 0:00:06
Sstate summary: Wanted 5 Local 3 Network 0 Missed 2 Current 1114 (60% match, 99% complete)
NOTE: Executing Tasks
ERROR: evccapplication-1.0-r0 do_image: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_image(d)
0003:
File: '/home/michael/Documents/evcc_custom/sources/poky/meta/classes/image.bbclass', lineno: 262, function: do_image
0258:
0259: d.setVarFlag('REPRODUCIBLE_TIMESTAMP_ROOTFS', 'export', '1')
0260: pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND")
0261:
*** 0262: execute_pre_post_process(d, pre_process_cmds)
0263:}
0264:do_image[dirs] = "${TOPDIR}"
0265:addtask do_image after do_rootfs
0266:
File: '/home/michael/Documents/evcc_custom/sources/poky/meta/lib/oe/utils.py', lineno: 263, function: execute_pre_post_process
0259: for cmd in cmds.strip().split(';'):
0260: cmd = cmd.strip()
0261: if cmd != '':
0262: bb.note("Executing %s ..." % cmd)
*** 0263: bb.build.exec_func(cmd, d)
0264:
0265:# For each item in items, call the function 'target' with item as the first
0266:# argument, extraargs as the other arguments and handle any exceptions in the
0267:# parent thread
File: '/home/michael/Documents/evcc_custom/sources/poky/bitbake/lib/bb/build.py', lineno: 256, function: exec_func
0252: with bb.utils.fileslocked(lockfiles):
0253: if ispython:
0254: exec_func_python(func, d, runfile, cwd=adir)
0255: else:
*** 0256: exec_func_shell(func, d, runfile, cwd=adir)
0257:
0258: try:
0259: curcwd = os.getcwd()
0260: except:
File: '/home/michael/Documents/evcc_custom/sources/poky/bitbake/lib/bb/build.py', lineno: 503, function: exec_func_shell
0499: with open(fifopath, 'r+b', buffering=0) as fifo:
0500: try:
0501: bb.debug(2, "Executing shell function %s" % func)
0502: with open(os.devnull, 'r+') as stdin, logfile:
*** 0503: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0504: except bb.process.ExecutionError as exe:
0505: # Find the backtrace that the shell trap generated
0506: backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)")
0507: stdout_lines = (exe.stdout or "").split("\n")
File: '/home/michael/Documents/evcc_custom/sources/poky/bitbake/lib/bb/process.py', lineno: 186, function: run
0182:
0183: if pipe.returncode != 0:
0184: if log:
0185: # Don't duplicate the output in the exception if logging it
*** 0186: raise ExecutionError(cmd, pipe.returncode, None, None)
0187: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0188: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/home/michael/Documents/evcc_custom/build-fb/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/evccapplication/1.0-r0/temp/run.prelink_image.131394' failed with exit code 2
ERROR: Logfile of failure stored in: /home/michael/Documents/evcc_custom/build-fb/tmp/work/imx6ull14x14evk-poky-linux-gnueabi/evccapplication/1.0-r0/temp/log.do_image.131394
ERROR: Task (/home/michael/Documents/evcc_custom/evcc_layers/meta-evccapplication/recipes-core/images/evccapplication.bb:do_image) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3064 tasks of which 3063 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/michael/Documents/evcc_custom/evcc_layers/meta-evccapplication/recipes-core/images/evccapplication.bb:do_image
Summary: There were 2 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
If you get an error similar to this delete your build folder. Then recreate it. For NXP devices they give you the command
DISTRO=fsl-imx-fb MACHINE=imx6ull14x14evk source imx-setup-release.sh -b build-fb
Save your local.conf and bblayers.bb file to git or to a new location.
Delete the build-fb folder and re-run the command above. Pull in any changes from git or files saved elsewhere.
Re-run bitbake. This got my workspace back. Because you are not deleting any of the downloads folders the build takes little time. All the time is spent compiling sources.

ERROR: YoctoProject - core-image-sato: do_populate_sdk

I am a beginner in Yocto project. I am trying to build the image for Beaglebone Black Board with command-line: bitbake core-image-sato -c populate_sdk and I had an error (the detail in the below) in last task.
Enviroment build: Ubuntu 16.04 LTS, using Bash Shell instead of Dash Shell.
I tried to build again many times but still facing same error. Anybody can help me to fix this error?
Log file:
NOTE: Executing create_sdk_files ...
DEBUG: Executing shell function create_sdk_files
DEBUG: Shell function create_sdk_files finished
NOTE: Executing check_sdk_sysroots ...
DEBUG: Executing python function check_sdk_sysroots
DEBUG: Python function check_sdk_sysroots finished
NOTE: Executing archive_sdk ...
DEBUG: Executing shell function archive_sdk
/home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392: line 106: 11617 Broken pipe tar --owner=root --group=root -cf - .
11618 Killed | xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz
WARNING: /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392:1 exit 137 from 'xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz'
ERROR: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:do_populate_sdk(d)
0003:
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/classes/populate_sdk_base.bbclass', lineno: 169, function: do_populate_sdk
0165:
0166: populate_sdk(d)
0167:
0168:fakeroot python do_populate_sdk() {
*** 0169: populate_sdk_common(d)
0170:}
0171:SSTATETASKS += "do_populate_sdk"
0172:SSTATE_SKIP_CREATION_task-populate-sdk = '1'
0173:do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/classes/populate_sdk_base.bbclass', lineno: 166, function: populate_sdk_common
0162: manifest_type=Manifest.MANIFEST_TYPE_SDK_HOST)
0163: create_manifest(d, manifest_dir=d.getVar('SDK_DIR'),
0164: manifest_type=Manifest.MANIFEST_TYPE_SDK_TARGET)
0165:
*** 0166: populate_sdk(d)
0167:
0168:fakeroot python do_populate_sdk() {
0169: populate_sdk_common(d)
0170:}
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/lib/oe/sdk.py', lineno: 413, function: populate_sdk
0409: env_bkp = os.environ.copy()
0410:
0411: img_type = d.getVar('IMAGE_PKGTYPE')
0412: if img_type == "rpm":
*** 0413: RpmSdk(d, manifest_dir).populate()
0414: elif img_type == "ipk":
0415: OpkgSdk(d, manifest_dir).populate()
0416: elif img_type == "deb":
0417: DpkgSdk(d, manifest_dir).populate()
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/lib/oe/sdk.py', lineno: 60, function: populate
0056: self.sysconfdir, "ld.so.cache")
0057: self.mkdirhier(os.path.dirname(link_name))
0058: os.symlink("/etc/ld.so.cache", link_name)
0059:
*** 0060: execute_pre_post_process(self.d, self.d.getVar('SDK_POSTPROCESS_COMMAND'))
0061:
0062: def movefile(self, sourcefile, destdir):
0063: try:
0064: # FIXME: this check of movefile's return code to None should be
File: '/home/huongnguyen/Desktop/poky/openembedded-core/meta/lib/oe/utils.py', lineno: 260, function: execute_pre_post_process
0256: for cmd in cmds.strip().split(';'):
0257: cmd = cmd.strip()
0258: if cmd != '':
0259: bb.note("Executing %s ..." % cmd)
*** 0260: bb.build.exec_func(cmd, d)
0261:
0262:# For each item in items, call the function 'target' with item as the first
0263:# argument, extraargs as the other arguments and handle any exceptions in the
0264:# parent thread
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/build.py', lineno: 249, function: exec_func
0245: with bb.utils.fileslocked(lockfiles):
0246: if ispython:
0247: exec_func_python(func, d, runfile, cwd=adir)
0248: else:
*** 0249: exec_func_shell(func, d, runfile, cwd=adir)
0250:
0251: try:
0252: curcwd = os.getcwd()
0253: except:
File: '/usr/lib/python3.5/contextlib.py', lineno: 77, function: __exit__
0073: # Need to force instantiation so we can reliably
0074: # tell if we get the same exception back
0075: value = type()
0076: try:
*** 0077: self.gen.throw(type, value, traceback)
0078: raise RuntimeError("generator didn't stop after throw()")
0079: except StopIteration as exc:
0080: # Suppress StopIteration *unless* it's the same exception that
0081: # was passed to throw(). This prevents a StopIteration
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/utils.py', lineno: 431, function: fileslocked
0427: if files:
0428: for lockfile in files:
0429: locks.append(bb.utils.lockfile(lockfile))
0430:
*** 0431: yield
0432:
0433: for lock in locks:
0434: bb.utils.unlockfile(lock)
0435:
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/build.py', lineno: 249, function: exec_func
0245: with bb.utils.fileslocked(lockfiles):
0246: if ispython:
0247: exec_func_python(func, d, runfile, cwd=adir)
0248: else:
*** 0249: exec_func_shell(func, d, runfile, cwd=adir)
0250:
0251: try:
0252: curcwd = os.getcwd()
0253: except:
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/build.py', lineno: 450, function: exec_func_shell
0446: with open(fifopath, 'r+b', buffering=0) as fifo:
0447: try:
0448: bb.debug(2, "Executing shell function %s" % func)
0449: with open(os.devnull, 'r+') as stdin, logfile:
*** 0450: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0451: finally:
0452: os.unlink(fifopath)
0453:
0454: bb.debug(2, "Shell function %s finished" % func)
File: '/home/huongnguyen/Desktop/poky/bitbake/lib/bb/process.py', lineno: 182, function: run
0178: if not stderr is None:
0179: stderr = stderr.decode("utf-8")
0180:
0181: if pipe.returncode != 0:
*** 0182: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0183: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392' failed with exit code 137:
/home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392: line 106: 11617 Broken pipe tar --owner=root --group=root -cf - .
11618 Killed | xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz
WARNING: /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/run.archive_sdk.4392:1 exit 137 from 'xz -T 0 -9 > /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/x86_64-deploy-core-image-sato-populate-sdk/poky-glibc-x86_64-core-image-sato-armv7at2hf-neon-beaglebone-toolchain-3.0.tar.xz'
ERROR: Logfile of failure stored in: /home/huongnguyen/Desktop/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/core-image-sato/1.0-r0/temp/log.do_populate_sdk.4392
ERROR: Task (/home/huongnguyen/Desktop/poky/openembedded-core/meta/recipes-sato/images/core-image-sato.bb:do_populate_sdk) failed with exit code '1'
Exit code 137 means something killed xz during the build. You may be running out of memory: check dmesg after this happens, there might be a log line about out-of-memory killer.
Had the same problem and could make it go away with XZ_MEMLIMIT="75%" bitbake image-name -c do_populate_sdk. The bitbake.conf in my version of Yocto defaults XZ_MEMLIMIT to 50%.
Had the same problem and none of the usual methods, like, deleting hidden repo file worked.
I then clean the build using bitbake -c clean mybuildname and then again made the build and it worked flawlessly, I hope it helps someone.

CHECK failed while writing custom loss layer in Caffe

I get the following error while running a test case for a custom built loss function in caffe. This loss function uses Reshape layer on the bottom blob to this layer (This is mentioned in the LayerSetUp() method of the Custom loss function.
Error:
F0704 01:49:54.075613 16977 blob.cpp:145] Check failed: diff_
*** Check failure stack trace: ***
# 0x7f627a1965cd google::LogMessage::Fail()
# 0x7f627a198433 google::LogMessage::SendToLog()
# 0x7f627a19615b google::LogMessage::Flush()
# 0x7f627a198e1e google::LogMessageFatal::~LogMessageFatal()
# 0x7f62754dd96b caffe::Blob<>::mutable_cpu_diff()
# 0x500e8a caffe::CustomLossLayerTest_TestRead_Test<>::TestBody()
# 0x940693 testing::internal::HandleExceptionsInMethodIfSupported<>()
# 0x939caa testing::Test::Run()
# 0x939df8 testing::TestInfo::Run()
# 0x939ed5 testing::TestCase::Run()
# 0x93b1af testing::internal::UnitTestImpl::RunAllTests()
# 0x93b4d3 testing::UnitTest::Run()
# 0x46f5fd main
# 0x7f6274811830 __libc_start_main
# 0x477229 _start
# (nil) (unknown)
Makefile:532: recipe for target 'runtest' failed
make: *** [runtest] Aborted (core dumped)
What could be the possible reason ?

cannot create parpool in matlab in slurm, ubuntu16.04 server

I have some trouble on creating parpool in matlab in slurm
when I submit the job, it will get stuck :
parpool size: 24
Starting parallel pool (parpool) using the 'local' profile ...
or error
{Error using parpool (line 104)
Failed to start a parallel pool. (For information in addition to the causing
error, validate the profile 'local' in the Cluster Profile Manager.)
Error in run (line 86)
evalin('caller', [script ';']);
Caused by:
Error using parallel.internal.pool.InteractiveClient>iThrowWithCause (line
666)
Failed to initialize the interactive session.
Error using
parallel.internal.pool.InteractiveClient>iThrowIfBadParallelJobStatus
(line 767)
The interactive communicating job failed with no message.
}
There is also a matlab crash dump file
------------------------------------------------------------------------
Segmentation violation detected at Sun Apr 2 11:36:33 2017
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
GNU C Library : 2.23 stable
Host Name : wmc-slave-g2
MATLAB Architecture : glnxa64
MATLAB Root : /opt/matlab/R2017a
MATLAB Version : 9.2.0.538062 (R2017a)
Operating System : Linux 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64
Processor ID : x86 Family 6 Model 79 Stepping 1, GenuineIntel
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 00007f7410256900 RBX = 0000000000000000
RCX = 0000000000000000 RDX = 00007f7410256978
RSP = 00007f741e240868 RBP = 00007f741e240870
RSI = 0000000000000000 RDI = 00007f741e240870
R8 = 0000000000000000 R9 = 0000000000000000
R10 = 00000000000000ed R11 = 00007f743afade60
R12 = 00007f7410256978 R13 = 00007f741e2408a0
R14 = 00007f741e2409f0 R15 = 00007f7410258110
RIP = 00007f743afade60 EFL = 0000000000010202
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f743afade60 /opt/matlab/R2017a/bin/glnxa64/libboost_thread.so.1.56.0+00069216 _ZNK5boost6thread15get_thread_infoEv+00000000
[ 1] 0x0000000000000000 <unknown-module>+00000000
If this problem is reproducible, please submit a Service Request via:
A technical support engineer might contact you with further information.
Thanks
This is usually due to java version incompatibility used for Matlab on Linux. issue:
echo $MATLAB_JAVA
If this variable set, you can unset this option and let Matlab use its own java. you can run a script like this:
#!/bin/sh
unset MATLAB_JAVA
matlab -desktop