For a few days now I get the following issue when starting up the Address Sanitizer within Xcode 7.3. The error messages printed to the Xcode console when the Sanitizer found an issue (that was actually suppressed by a file):
==13392==WARNING: Can't write to symbolizer at fd 55
==13392==WARNING: Can't write to symbolizer at fd 55
==13392==WARNING: Can't write to symbolizer at fd 55
==13392==WARNING: Can't write to symbolizer at fd 55
==13392==WARNING: Failed to use and restart external symbolizer!
I found the error messages in the repository but still I can't explain what's going on. Obviously the internal write function fails but I have no idea whats causing this. Any ideas?
https://github.com/Microsoft/compiler-rt/blob/master/lib/sanitizer_common/sanitizer_symbolizer_process_libcdep.cc#L100
ASAN is missing from your path. The following was done outside Xcode to see if I could manifest the error and it was easy if the path was undefined. My guess is XCode cannot find it where it's looking or as in the following case the ASAN path is undefined.
When you try this if you add and remove it from your path the error goes away but the line numbers also disappear ie if you want to see the actual error message again you need to use
unset ASAN_SYMBOLIZER_PATH
not
ASAN_SYMBOLIZER_PATH=
Create a c program as follows...
int main(void){
int a[3];
a[3] = 4;
return 0;
}
Compile it, please ignore warnings for now...
gcc -std=c11 -Wall -g3 -fno-omit-frame-pointer -fsanitize=address broken_asan_test.c
./a.out
You should see something like this...
=================================================================
==29192==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff5ad1052c at pc 0x000104eefe78 bp 0x7fff5ad104f0 sp 0x7fff5ad104e8
WRITE of size 4 at 0x7fff5ad1052c thread T0
#0 0x104eefe77 in atos[29193]: [fatal] 'pid_for_task' failed: (os/kern) failure (5) (+0x100000e77)
==29192==WARNING: Can't write to symbolizer at fd 3
#1 0x7fff940495ac in atos[29206]: [fatal] 'pid_for_task' failed: (os/kern) failure (5) (+0x35ac)
#2 0x0 (<unknown module>)
Notice this line
==29192==WARNING: Can't write to symbolizer at fd 3
Change to have the symbolizer added to your path...
export ASAN_SYMBOLIZER_PATH=/usr/local/Cellar/llvm/3.6.2/bin/llvm-symbolizer
and the error disappears...
=================================================================
==29312==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff55ac450c at pc 0x00010a13be78 bp 0x7fff55ac44d0 sp 0x7fff55ac44c8
WRITE of size 4 at 0x7fff55ac450c thread T0
#0 0x10a13be77 in main (/git/ghub/doc/c/./a.out+0x100000e77)
#1 0x7fff940495ac in start (/usr/lib/system/libdyld.dylib+0x35ac)
#2 0x0 (<unknown module>)
Related
My Anchor program is giving me a Transaction simulation failed: Error processing Instruction 1: custom program error: 0xa7 with nothing useful in the logs.
How do I even begin to debug this?
Custom Program Error 0xa7 is Error: 167: The given account is not owned by the executing program.
This might happen if you pass in an account that's expected to be owned by a program, but isn't.
This can happen accidentally if you forget to set declare_id!(/* ... */) to the program id you're trying to hit.
Consider logging the program id that you're using in your javascript client:
console.log(program.programId)
And then seeing if that matches the public key that's in your target/idl/yourprogram.json file.
I've recently created a build of OpenCV with Julia bindings. It's probably because I'm new to Julia, but it's been challenging getting the appropriate argument typing for the opencv function calls. Anyway, I managed to get the code below executing properly so that it renders a half-scale version of the images captured from a web cam with just a little latency and at 15 fps, but when I re-run it with a change to scale the image down to one-fourth of the size, it core dumps.
So this works:
print("Initializing OpenCV...")
using Printf
using OpenCV
cv = OpenCV
cap = cv.VideoCapture("/dev/video0")
global count = 0
print("Ready\n ",count)
scaleDown = 2
while (cv.isOpened(cap))
global count
ret,img = cv.read(cap)
c,w,h=size(img)
#printf("%d %d %d\n",c,w,h)
sz = cv.Size(Int32(w÷scaleDown),Int32(h÷scaleDown))
img2 = cv.pyrDown(img,dstsize=sz)
count = count + 1
cv.imshow("Down",img2)
if cv.waitKey(Int32(1)) & 0xFF == Int('q')
break
end
end
cv.release(cap)
cv.destroyAllWindows()
print(count)
However, if scaleDown is set to 4, this results:
signal (6): Aborted
in expression starting at /home/kevin/Projects3/video-test.jl:15
gsignal at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7f27ba2e3675)
_ZN2cv5errorEiRKNSt7__ ... _wrapEUlS2_S2_S5_S6_E387_E9_M_invokeERKSt9_Any_dataS2_S2_S5_S6_ at /home/kevin/Projects2/build/OpenCV/src/lib/libopencv_julia (unknown line)
_ZN5jlcxx6detail11CallFunctorIN2cv3MatEJRS3_S4_RNS2_5Size_IiEERiEE5applyEPKvNS_13WrappedCppPtrESC_SC_SC_ at /home/kevin/Projects2/build/OpenCV/src/lib/libopencv_julia (unknown line)
jlopencv_cv_cv_pyrDown at /home/kevin/.julia/packages/CxxWrap/ZOkSN/src/CxxWrap.jl:590
pyrDown at /home/kevin/Projects2/build/OpenCV/src/cv_cxx_wrap.jl:1162 [inlined]
#pyrDown#57 at /home/kevin/Projects2/build/OpenCV/src/cv_cxx_wrap.jl:1164 [inlined]
pyrDown##kw at /home/kevin/Projects2/build/OpenCV/src/cv_cxx_wrap.jl:1164
unknown function (ip: 0x7f279e09f055)
top-level scope at /home/kevin/Projects3/video-test.jl:21
unknown function (ip: 0x7f27be5ec030)
unknown function (ip: 0x7f27be5c7105)
jl_load at /usr/bin/../lib/x86_64-linux-gnu/libjulia.so.1 (unknown line)
include at ./Base.jl:377
exec_options at ./client.jl:288
_start at ./client.jl:484
jfptr__start_2075.clone_1 at /usr/lib/x86_64-linux-gnu/julia/sys.so (unknown line)
unknown function (ip: 0x55ece9ac99d9)
unknown function (ip: 0x55ece9ac95a6)
__libc_start_main at /usr/bin/../lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x55ece9ac964d)
Allocations: 10815726 (Pool: 10814596; Big: 1130); GC: 3
Aborted (core dumped)
Why?
Please refer to the documentation for pyrDown at https://docs.opencv.org/3.4/d4/d86/group__imgproc__filter.html#gaf9bba239dfca11654cb7f50f889fc2ff
In particular, I believe the dstsize is failing the condition and causing an assert to be raised. For some reason, your build is not handling it properly.
I tried the same thing with a debug build and I'm getting the proper error message as
ERROR: OpenCV(4.4.0-pre) /home/archit/GSoC_Work/opencv/modules/imgproc/src/pyramids.cpp:759: error: (-215:Assertion failed) ssize.width > 0 && ssize.height > 0 && std::abs(dsize.width*2 - ssize.width) <= 2 && std::abs(dsize.height*2 - ssize.height) <= 2 in function 'pyrDown_'
Stacktrace:
[1] jlopencv_cv_cv_pyrDown(::OpenCV.CxxMatAllocated, ::OpenCV.CxxMatAllocated, ::OpenCV.Size{Int32}, ::Int32) at /home/archit/.julia/packages/CxxWrap/ZOkSN/src/CxxWrap.jl:590
[2] pyrDown at /home/archit/GSoC_Work/opencv_build/OpenCV/src/cv_cxx_wrap.jl:1141 [inlined]
[3] #pyrDown#57 at /home/archit/GSoC_Work/opencv_build/OpenCV/src/cv_cxx_wrap.jl:1143 [inlined]
[4] top-level scope at ./REPL[9]:7
Can you share the exact version of Julia that you used along with the build commands so that I can identify why the error wasn't properly handled?
I try some set up config to load u-boot for a new board. My configuration is based on U-boot for Beagle Bone Black. I also follow some changes for new board on https://github.com/PacktPublishing/Mastering-Embedded-Linux-Programming-Second-Edition/blob/master/Chapter03/0001-BSP-for-Nova.patch.
I clone a new u-boot and stand at master branch, after I made config file for new board, I ran make. It has 2 issues:
First is about SYS_TEXT_BASE:
scripts/kconfig/conf --syncconfig Kconfig
.config:22:warning: symbol value '' invalid for SYS_TEXT_BASE
*
* Restart config...
*
*
Boot images
*
Enable support for Android Boot Images (ANDROID_BOOT_IMAGE) [Y/n/?] y
Support Flattened Image Tree (FIT) [N/y/?] n
Enable support for the legacy image format (IMAGE_FORMAT_LEGACY)
[Y/n/?] y
Set up board-specific details in device tree before boot
(OF_BOARD_SETUP) [N/y/?] n
Set up system-specific details in device tree before boot
(OF_SYSTEM_SETUP) [N/y/?] n
Update the device-tree stdout alias from U-Boot (OF_STDOUT_VIA_ALIAS)
[N/y/?] n
Extra Options (DEPRECATED) (SYS_EXTRA_OPTIONS) []
Text Base (SYS_TEXT_BASE) [] (NEW)
Then I search for a SYS_TEXT_BASE and entered a random text base: 0xfff10000. But I think it's not for Beagle Bone.
Error LINUX_ARM_ARCH
In file included from ./arch/arm/include/asm/system.h:6:0,
from ./arch/arm/include/asm/cache.h:11,
from include/net.h:15,
from include/common.h:517,
from lib/asm-offsets.c:14:
./arch/arm/include/asm/barriers.h:32:24: error: operator '>=' has no
left operand #if LINUX_ARM_ARCH >= 7
^~
./arch/arm/include/asm/barriers.h:36:26: error: operator '==' has no
left operand #elif LINUX_ARM_ARCH == 6
^~
Kbuild:43: recipe for target 'lib/asm-offsets.s' failed
make[1]: *** [lib/asm-offsets.s] Error 1
Makefile:1575: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
For the second issue, this was caused by a Kconfig option being renamed on master (CPU_V7 to CPU_V7A). I changed in Kconfig CUP_V7A to CPU_V7, but still has the same issue. Please look into, thanks.
The text base of the Beaglebone Black Board is CONFIG_SYS_TEXT_BASE=0x80100000. It is specified in configs/omap3_beagle_defconfig.
The symbol __LINUX_ARM_ARCH__ is defined in arch/arm/Makefile based on CONFIG_SYS_ARM_ARCH which is defined in .config. So something must be wrong with your .config file.
When i try to install new theme both from ftp and my computer im getting following error:
Warning: Error while sending QUERY packet. PID=89741 in
/home/fansport/public_html/fansportsklep.pl/classes/db/DbPDO.php on
line 91
Catchable fatal error: Argument 2 passed to
ObjectModelCore::hydrateCollection() must be of the type array,
boolean given, called in
/home/fansport/public_html/fansportsklep.pl/classes/PrestaShopCollection.php
on line 358 and defined in
/home/fansport/public_html/fansportsklep.pl/classes/ObjectModel.php on
line 1495
I dont have any idea what is wrong.
Check "max_allowed_packet" in MySQL and increase the value. That could solve the problem.
I've got the following code:
local M=ffi.load "physfs"
ffi.cdef [[ //basically the preprocessed content of physfs.h, see http://icculus.org/physfs/docs/html/physfs_8h.html ]]
M.PHYSFS_init(arg[0])
M.PHYSFS_setSaneConfig("a","b","zip",0,0)
function file2str(path)
local cpath=ffi.cast("const char *",path)
print(1) --debug
if M.PHYSFS_exists(cpath)==0 then return nil,"file not found" end
print(2) --debug
-- some more magic
end
assert(file2str("someFile.txt"))
when calling, I expect debug output 1 and 2, or at least the assert triggering, but I only get:
1
["endless" (i pressed ^C after about a minute) freeze]
when i finally got luajit to run in gdb, this is the backtrace when freezing:
(gdb) bt
#0 0x00007ffff37a5c40 in __pause_nocancel ()
at ../sysdeps/unix/syscall-template.S:81
#1 0x00007ffff379bce6 in __pthread_mutex_lock_full (mutex=0x68cbf0)
at ../nptl/pthread_mutex_lock.c:354
#2 0x00007ffff606951f in __PHYSFS_platformGrabMutex (mutex=0x68cbf0)
at /home/kyra/YDist/src/physfs-2.0.3/platform/unix.c:403
#3 0x00007ffff606410d in PHYSFS_getWriteDir ()
at /home/kyra/YDist/src/physfs-2.0.3/physfs.c:913
#4 0x000000000045482b in ?? ()
#5 0x000000000043a829 in ?? ()
#6 0x000000000043af17 in ?? ()
#7 0x00000000004526a6 in ?? ()
#8 0x0000000000446fb0 in lua_pcall ()
#9 0x00000000004047dc in _start ()
so it seems to me that something is blocking the mutex, which is kinda strange, because, while there are two threads running, only one even touches physfs (the second thread doesn't even ffi.load "physfs")
what could/should I do?
I still don't really know what the hell is going on, but while trying to further debug the mutex in gdb I LD_PRELOADed libpthread.so to the gdb process, and suddenly it worked.
Then I tried just preloading it to luajit without gdb, also works.
Then I dug further into physfs and lualanes (which is a pthread ffi wrapper I'm using for threading), to find out they both try to load libpthread if not already loaded, but physfs from C and lualanes using the ffi, which somehow doesn't see the one loaded by physfs, and the process ends up with 2 copies of the library loaded.
so the fix is to explicitely do a ffi.load"pthread" before ffi.load"physfs", because while lanes can't see the version loaded by physfs, physfs is just happy with the version loaded by us, and doesn't try to load it again, while the luajit ffi ignores further load tries made by lanes.