Multiple MSI interrupt failing - interrupt

I am currently running this pci test :
https://www.kernel.org/doc/html/latest/PCI/endpoint/pci-test-howto.html
My test is working fine for following test:
pcitest -m 1
but failing for other interrupts. e.g.
pcitest -m 2 (or 3,4,5...32)
On further debugging, I found that ISR is getting called twice for msi > 1.
One for msi == 1 and other for msi > 1.
What could be the issue?

Related

/include/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed

on Ubuntu 16.04, I compiled the spinnaker SDK src/Acquisition/make, I got the "Acquisition" under bin/
When I run it, I got the error:
Number of cameras detected: 1
Running example for camera 0...
* DEVICE INFORMATION *
DeviceID: 18073382
DeviceSerialNumber: 18073382
DeviceVendorName: Point Grey Research
DeviceModelName: Grasshopper3 GS3-U3-32S4M
DeviceType: U3V
DeviceDisplayName: Point Grey Research
DeviceAccessStatus: OpenReadWrite
DeviceVersion: FW:v2.25.3.00 FPGA:v2.02
DeviceDriverVersion: none : 0.0.0.0
DeviceUserID:
DeviceIsUpdater: 0
DeviceInstanceId: 0113C726
DeviceLocation:
DeviceCurrentSpeed: HighSpeed
GUIXMLLocation: Device
GUIXMLPath: Input.xml
GenICamXMLLocation: Device
GenICamXMLPath:
DeviceU3VProtocol: 1
* IMAGE ACQUISITION *
Acquisition mode set to continuous...
Unable to begin image acquisition. Aborting with error -1010...
Camera 0 example complete...
Done! Press Enter to exit...
Acquisition_C: /softwarelib/Boost/boost_1_60_0/GCC_5_3_1/linux_cpp11/release/amd64/include/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed
The sample code itself doesn't use mutex at all.
This error is due to insufficient usbfs memory allocation. Please refer to section 3 of the spinnaker readme as follows for info on how to increase the value to 1000:
===============================================================================
3. USB RELATED NOTES
On Linux systems, the USB-FS memory is restricted to 16 MB or less by default. To
increase this limit to make use of the imaging hardware's full capabilities, a
minor change needs to be made to the system.
To PERMANENTLY modify the USB-FS memory:
1. Open the /etc/default/grub file in any text editor. Find and replace:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
with this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"
2. Update grub with these settings:
$ sudo update-grub
3. Reboot and test a USB 3.1 camera.
If this method fails to set the memory limit, to TEMPORARILY modify the USB-FS
memory until the next reboot, run the following command:
$ sudo sh -c 'echo 1000 > /sys/module/usbcore/parameters/usbfs_memory_mb'
To confirm that the memory limit has been successfully updated, run the following command:
$ cat /sys/module/usbcore/parameters/usbfs_memory_mb
If using multiple USB3 cameras, the USB-FS memory limit may need to exceed 1000.
More information on these changes can be found at:
https://www.flir.com/support-center/iis/machine-vision/application-note/understanding-usbfs-on-linux

Xvfb Jenkins plugin: Unrecognized option: -displayfd

Jenkins version: 1.573
Jenkins Xvfb Plugin version: 1.0.15 (latest)
Linux OS: Red Hat Enterprise Linux Server release 5.9 (Tikanga)
Xorg -version
X Window System Version 7.1.1
Release Date: 12 May 2006
X Protocol Version 11, Revision 0, Release 7.1.1
Build Operating System: Linux 2.6.18-308.13.1.el5 x86_64 Red Hat, Inc.
Current Operating System: Linux kobaloki2 2.6.18-348.16.1.el5 #1 SMP Sat Jul 27 01:05:23 EDT 2013 x86_64
Build Date: 06 November 2012
Build ID: xorg-x11-server 1.1.1-48.100.el5
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
which Xvfb
/usr/bin/Xvfb
I have some Selenium GUI based tests, that I'm running against a given environment/server's web site and where these tests check if everything for that site is working fine or not i.e. performing logging in / out and some other few clicks here n there successfully.
As these are Selenium GUI tests and I want to run these tests on a machine (Linux) in a HEADLESS mode, I need X display server (Xvfb).
I exported DISPLAY variable and started /etc/init.d/xvfb successfully.
root 5996 1 0 2014 ? 00:00:00 /usr/bin/Xvfb :99 -ac -screen 0 1024x768x8
I'm using Xvfb plugin, which is installed successfully on my Jenkins instance and configurations in both Jenkins Global and Jenkins job level is setup correctly and it's working fine if I run the job on master/slave instances (NOTE: Currently I have created 2 slaves on the same master server but I have other separate servers where I'm planning to install more slaves).
When I run only 2 simultaneous runs of the job, I see the following additional processes i.e. per run and the job finishes successfully. NOTE: My offset value in Xvfb plugin is 1. If I use 100, then the following will show :101 and :102 respectively.
u10003 16264 6921 1 12:56 ? 00:00:01 Xvfb :1 -screen 0 1024x768x8 -fbdir /production/JSlaves/kobaloki2_2/xvfb-2015-02-03_12-56-41-60597.fbdir
u10003 16289 6691 0 12:56 ? 00:00:00 Xvfb :2 -screen 0 1024x768x8 -fbdir /production/JSlaves/kobaloki2_1/xvfb-2015-02-03_12-56-46-7546741396559175462.fbdir
I trying to run concurrent runs of a Jenkins job (which successfully runs Selenium GUI Integration/Acceptance tests on a master / slave servers).
Now, What I'm trying to achieve is to run multiple concurrent builds/runs of this Jenkins job (so that I can have multiple tests running at the same time i.e. to perform some kind of Volume based testing). At this moment, I don't want to run these tests on a Selenium Grid server (out of scope of this post).
My questions:
1. If the check box for "Let Xvfb choose display name" is checked, then I'm getting the following error (here the job ran on a master Jenkins instance instead of a slave, thus /production/jenkinsAKS/... base folder). How can I make Xvfb to use -displayfd variable successfully?
13:33:01 Xvfb starting$ Xvfb -displayfd 2 -screen 0 1024x768x8 -fbdir /production/jenkinsAKS/xvfb-2015-02-03_13-33-00-6577455998897275731.fbdir
13:33:01 Unrecognized option: -displayfd
...
....bunch of options for Xvfb command
...
..
13:33:01 Fatal server error:
13:33:01 Unrecognized option: -displayfd
13:33:01
13:33:11
13:33:11 ERROR: Xvfb failed to start, consult the lines above for errors
Per this link: https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin
Let Xvfb choose display name Uses the -displayfd option of Xvfb by which it chooses its own display name by scanning for an available one. This option requires a recent version of xserver, check your installation for support. Useful if you do not want to manage display number ranges but have the first free display number be used.
2. In the above snapshot (Xvfb plugin), I see Xvfb additional options box, is there any option that I can try which will tell Xvfb to use a display# which is not currently in use?
3. It seems like I need to update X server version (Xorg -version). How can I do that, what commands should I run?
4. If I un-check the above mentioned checkbox and if I run multiple builds (more than 2) of this Jenkins job, then I get the following error if the DISPLAY number is already in use. Using that checkbox in Xvfb plugin, I was trying to tell Xvfb to use the display number from the free list if one if not available.
This error comes either for display #1 or #2 depending upon how Xvfb plugin assigns the number in Jenkins environment (using node/slave# etc).
13:04:27 Fatal server error:
13:04:27 Server is already active for display 1
13:04:27 If this server is no longer running, remove /tmp/.X1-lock
13:04:27 and start again.
13:04:27
13:04:27 unlink: No such file or directory
13:04:42 unlink failed, errno 2
13:04:42 ERROR: Xvfb failed to start, consult the lines above for errors
**How can I get rid of the above error** (seems like when I can resolve bullet 2 above)?
NOTE: If I use a single slave (either on the same master instance or on any other server) and increase the # of executors from 1/2 to 20 or greater, then, Xvfb is successfully running N number of builds/runs/tests at the same time without any failures. I can also use naginator plugin if required for retrying a failed build if any due to DISPLAY not available. BUT, this is not what I'm looking at this time.
Answer time.
It depends on your machine i.e. Xvfb installed on your machine may not have -displayfd option (but may be a different similar one) but Xvfb plugin in Jenkins is passing it for you when you check that checkbox. Try a different option if available (see Xvfb help or man page on your OS machine). Now, I'm NOT using / checking this checkbox.
Actually not required as Xvfb plugin will generate a new instance and assign a DISPLAY (:NN) where NN is a number automatically per individual run.
I can use yum command.
This error doesn't come each time. If this happens and error comes in all Jenkins job runs, then you can run the following command to fix it.
/etc/init.d/xvfb stop; sleep 2; /etc/init.d/xvfb start
To get a copy of xvfb file, you can get it online (where some xvfb file which sits under /etc/init.d folder, have more options that just stop/start.
Now, the solution to my ACTUAL problem (for which I was trying everything) is mentioned in other post here: Xvfb, Jenkins, Selenium tests - Capture Screenshots of all pages

Trigger correct email when no NUnit tests are run in Jenkins

Setup:
Jenkins
NUnit
Selenium
Email-ext (Jenkins plugin)
We have a test suite in C# that does setup: it checks in TestRail for what tests exist in the test plan, and writes to a file that list of tests. The build in Jenkins has two build steps (after pull & build):
Run the setup suite to get the list of tests to bother running.
Run the suite, using the /runlist NUnit parameter to pull in that list.
This works fantastically when there are tests to be run.
However, due to [completely separate implementation], there will be times when that file is empty. Therefore, the NUnit result for the "run with list" build step:
Tests run: 0, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.010100375885762 seconds
Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
This tells Jenkins that this step failed:
C:\Program Files (x86)\Jenkins\jobs\[job_name]\workspace>exit 0
Archiving artifacts
Recording NUnit tests results
No test report files were found. Configuration error?
Build step 'Publish NUnit test result report' changed build result to FAILURE
Email was triggered for: Failure
Sending email for trigger: Failure
What I want is one of two things:
At the very least, it would not send out a failure email.
Ideally, the result from the setup build step would tell the build to stop, as there's nothing to build. The "Aborted" email trigger would be sent.
How do I configure Jenkins/this build to have that happen?
I believe I've found an answer to my own question.
Steps:
Install the Conditional Build Step plugin.
Install the Fail The Build plugin.
Add a batch script that returns error code 1 if the tests-to-run file size is 0, or error code 0 otherwise.
Add a single conditional build step:
Execute Windows Batch Commands == the path to the batch file.
Set the build result == Unstable (or whatever).
My batch file code:
#echo off
REM Retrieve the build name.
set arg1=%1
REM Set the file name.
set file="C:\Path\To\TestsToRunFile\%arg1%.txt"
REM Get the file size.
FOR /F "usebackq" %%A IN ('%file%') DO set size=%%~zA
REM Exit codes based on the file size.
IF %size% EQU 0 (
exit /b 0
) ELSE (
exit /b 1
)

Calling Bitkeeper command from telnet

I am calling a perl script in build machine 1 to connect to build machine 2 and call a perl script in build machine 2. The module I am using is Net::Telnet.
Recently I upgraded my bitkeeper in Build machine 2. Since then I am getting the license agreement form of Bitkeeper in the background. So my script is as good as paused till I kill the prompt's process from task manager.
If I kill the process, the bitkeeper clone command will fail and hence my entire build will fail. I am not able to bring this sneaky bkgui.exe process to front and accept the license agreement once and for all.
Can you please help me in solving this problem?
Observations:
I am not getting the license error when I open a command prompt in build machine 2 and call the same script which was called from telnet.
I ran 'whoami' command in my script running in build machine 2 and found it to be administrator.
'C:\WINDOWS\system32\tlntsvr.exe' is running and the USER is 'NT AUTHORITY\SYSTEM'.
When I call telnet from command line of buildmachine 1 and call the script in buildmachine 2, even then the bk command get executed successfully.
I want to run my bitkeeper command in build machine 2 from build machine 1.
You can try the bk legal -pT command. See bk help legal for usage.

Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1

I use msiexec.msi line command to run a msi file created using WIX, the setup is runn with the parameter /qb and /promptrestart, but if I get the line
"Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1"
in log the prompt didn't appear. The exit code of the msiexec process is 0 not 3010 (need restart) but the service that must be uninstalled remain in services.msc marked for deletion and some time even running (during install/uninstall services.msc is closed).
After restart the computer all works fine.
Could you please tell me how to detect that a restart is required?
Windows Installer is not very reliable when it comes to handling reboots. A good approach is to determine yourself if the install or uninstall process requires a reboot and trigger it manually if it does.
To perform a reboot you can use the REBOOT property.
You might also want to ensure the service isn't running through a custom action.