Troubleshooting Windows Event Viewer USB error 0x26 status 0xc000038e - usb

I need some guidance in how to troubleshoot a low level issue I am facing with some USB devices.
Background: I have a .NET Windows Service that, scans connected USB devices via WMI queries + reads low level USB data using external C code.
Although happening seldomly, once in a while a USB device (keyboard, mouse or smart card reader) stops functioning.
Looking at Windows's Device Manager, the device shows with a yellow triangle with an exclamation mark.
Looking at Event Viewer's Microsoft-Windows-Kernel PnP, I see the following error (for mouse, in this case)
XML View:
- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="Microsoft-Windows-Kernel-PnP" Guid="{9c205a39-1250-487d-abd7-e831c6290539}" />
<EventID>411</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x4000000000000000</Keywords>
<TimeCreated SystemTime="2022-12-22T08:15:21.1540378Z" />
<EventRecordID>300</EventRecordID>
<Correlation />
<Execution ProcessID="4" ThreadID="3780" />
<Channel>Microsoft-Windows-Kernel-PnP/Configuration</Channel>
<Computer>MyComputerName</Computer>
<Security UserID="S-1-5-18" />
</System>
- <EventData>
<Data Name="DeviceInstanceId">USB\VID_03F0&PID_094A\6&1ab5e341&0&2</Data>
<Data Name="DriverName">input.inf</Data>
<Data Name="ClassGuid">{745a17a0-74d3-11d0-b6fe-00a0c90f57da}</Data>
<Data Name="ServiceName">HidUsb</Data>
<Data Name="LowerFilters" />
<Data Name="UpperFilters" />
<Data Name="Problem">0x26</Data>
<Data Name="Status">0xc000038e</Data>
</EventData>
</Event>
How does one proceed from here?
There is no clear indication that the error is caused by the interactions with my .NET Service.
In any case, I guess I need to figure out how are such messages written to Windows' ETW. From there, try to locate where in the C code there is a hook or piece of code that feeds the given ETW listener.
Is this the right track? Are there shorter alternatives? Am I missing anything else?
Could not find conclusive info on what does the 0x26 error/0xc000038e status codes mean. Is there a specific resource for that?
Is there a way I can dump data from such error instances into a tool like Windows Debugger so it loads the the state of all the parts involved - and perhaps help ?
Identify the installed driver for this specific device - and search for logs it eventually writes?

as i commented the error seems to be propagated from
IopLoadDriver / IopUnloadDriver Paths Especially #
nt!PipCallDriverAddDeviceQueryRoutine
if you can setup a kd connection Set a bp on these routines and get a stacktrace
to analyze it better
0: kd> # c000038e fffff807`33000000 L?(fffff807`34046000-fffff807`33000000)
returns
nt!IopLoadUnloadDriver+0x60:
fffff807`33777b30 81fb8e0300c0 cmp ebx,0C000038Eh
nt!IopLoadDriver+0xec759:
fffff807`3381d661 41be8e0300c0 mov r14d,0C000038Eh
nt!PipCallDriverAddDeviceQueryRoutine+0xeb73b:
fffff807`3381e2f3 41b88e0300c0 mov r8d,0C000038Eh
a cursory glance in ghidra shows 26 being assigned to a variable
uVar11 = 0xc000038e;
if (iVar7 == 0xc000038e) {
uVar16 = 0x26;
or in disassembly
14081e2f3 41 b8 8e MOV param_3,0xc000038e
03 00 c0
14081e2f9 41 3b d8 CMP iVar7,param_3
14081e2fc 74 b9 JZ LAB_14081e2b7
which jumps to
14081e2b7 ba 26 00 00 00 MOV param_2,0x26
14081e2bc e8 13 1d f2 ff CALL PipSetDevNodeProblem
A DeviceNodeproblem will normally be reflected in an yellow bang or eventlog being written
so you should probably check where your code might try to prevent unloading , loading or keep a handle open

Related

Why this dash manifest keeps the player stuck until streams are downloaded?

I have this manifest file below . The issue is that the player waits for the streams to download completely before to start playing which is bad for the user experience. Any idea how to fix it? I expected the player to start range requests and feed media source with partial requests instead to wait for the streams to completely download.
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-live:2011" type="static" mediaPresentationDuration="PT30M67.6S" minBufferTime="PT2S">
<ProgramInformation></ProgramInformation>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="0" mimeType="video/webm" codecs="vp9" bandwidth="770153" width="854" height="480" frameRate="23421/1000">
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/video.webm</BaseURL>
<SegmentList duration="1840613" startNumber="1">
<Initialization range="0-219"/>
<SegmentURL indexRange="220-6592"/>
</SegmentList>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true" lang="und">
<Representation id="1" mimeType="audio/webm" codecs="opus" bandwidth="115412" audioSamplingRate="48000">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<BaseURL>https://liveradio.s3.eu-central-1.amazonaws.com/audio.webm</BaseURL>
<SegmentList duration="1840641" startNumber="1">
<Initialization range="0-258"/>
<SegmentURL indexRange="259-3444"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
You seem to be using a mix of the DASH 'live' profile approach and the 'on-demand' profile one - you can see the profile in the profiles="urn:mpeg:dash:profile:isoff-live:2011" at the top of your manifest.
At a very high level the difference is:
'live' profile manifests contain a list of urls for each segment to be downloaded.
'on-demand' profile manifests contain a URL to a file and an index to where the segments can be found in the file, so the client can download chunks as it wants.
DASH is a complex specification and it may be that some players will accept some mixes of profiles and others not, and not all players support all features - for example Shaka player claims not to support 'indexRange' (or did in 2017: https://github.com/google/shaka-player/issues/765)

IFilter with Custom properties

I'm developing a custom filter to my file format. Everything works fine when I use any of system keys from <propkey.h> like PKEY_Search_Contents.
But now I need to have my custom properties to register and use with Windows Search. Imagine:
"SELECT * FROM SystemIndex WHERE scope ='file:C:/' AND Publisher.Item.CustomProperty LIKE '%Test%'"
I saw about Property Handlers and already tested. I used the RecipePropertyHandler project from Windows 7 SDK Samples. And when I searched with this code:
// get a property store for the mp3 file
IPropertyStore* store = NULL;
HRESULT hr = SHGetPropertyStoreFromParsingName(L"SomePath",
NULL, GPS_DEFAULT, __uuidof(IPropertyStore), (void**)&store);
hr = HRESULT_FROM_WIN32(GetLastError());
PROPVARIANT variant;
store->GetValue(PKEY_Microsoft_SampleRecipe_Difficulty, &variant);
//// very important undocumented method
store->Release();
CoUninitialize();
I receive the correct answer.
But I don't understand how to union IFilter with IPropertyStore to create my custom properties. To start my IFilter, I used the example from Windows 7 SDK Samples. I'm doing something like:
chunkValue.SetTextValue(PKEY_SearchContents, filtered.c_str(),CHUNK_TEXT, 1046, 0, 0, CHUNK_EOS);
I didn't found the link anymore anymore but I read a quote of msdn about you can't implement IFilter AND IPropertyStore together. It's that true? Talking in other words, I can't create a custom property?
I saw all links from msdn, like link, link2 or any other.
I can do separate things but I don't know how to union both.
Any ideia how to implement?
EDIT
Im trying yet implement the PropertyHandler. My .propdesc file have this content:
-->
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/windows/2006/propertydescription"
schemaVersion="1.0">
<propertyDescriptionList publisher="Microsoft" product="SampleRecipe">
<propertyDescription name="Microsoft.SampleRecipe.Difficulty" formatID="{1794C9FE-74A9-497f-9C69-B31F03CE7EF9}" propID="100">
<description>This property indicates the preparation difficulty of a recipe.</description>
<searchInfo inInvertedIndex="true" isColumn="true" />
<typeInfo type="String" multipleValues="false" isViewable="true" />
<labelInfo label="Recipe difficulty" invitationText="Specify recipe difficulty" />
<displayInfo displayType="Enumerated" >
<editControl control="DropList"/>
<enumeratedList>
<enum value="Easy" text="Easy" />
<enum value="Medium" text="Medium" />
<enum value="Hard" text="Hard" />
</enumeratedList>
</displayInfo>
</propertyDescription>
<propertyDescription name="Microsoft.SampleRecipe.Keywords" formatID="{16D19FCB-7654-48AB-8057-DF8E51CC0755}" propID="100">
<description>This property indicates the preparation difficulty of a recipe.</description>
<searchInfo inInvertedIndex="true" isColumn="True"/>
<typeInfo type="String" multipleValues="true" isViewable="true" />
<labelInfo label="Recipe Keywords" invitationText="Specify recipe keyword" />
</propertyDescription>
</propertyDescriptionList>
</schema>
On Windows Properties:
I receive all informations from file... but when I try to search with Windows Search like:
SELECT Microsoft.SampleRecipe.Keywords FROM SystemIndex
Where directory='somedirectory'
I receive all lines empty... Any ideias why?
EDIT
I can see my properties on PropSchema:
I can use my Microsoft.SampleRecipe.DifficultyV2 on my WSSQL Query like:
SELECT Microsoft.SampleRecipe.KeywordsV2 FROM SystemIndex WHERE directory='C:\users\step\documents\rvffilter\'
But all the contents are empty

SCORM 2004 Rollup with single sco

I'm having issues rolling up a completion from a completed item.
I'm running this on SABA and I can successfully set the completion_status and success_status on the item but having issues rolling it up to the next level on the LMS, both satisfied and notSatisfied.
I find these rules utterly confusing. I do mostly work in SCORM 1.2.
This is my chunk to-date. Any assistance is really, really appreciated.
<organizations default="ORG-487461">
<organization identifier="ORG-487461">
<title>STATUS TESTING - 1d</title>
<item identifier="ACT-687940" identifierref="RES-123054">
<title>Launch</title>
<imsss:sequencing>
<imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true" />
</imsss:sequencing>
</item>
<imsss:sequencing>
<imsss:controlMode choice="true" flow="true"/>
<imsss:rollupRules>
<imsss:rollupRule childActivitySet="any">
<imsss:rollupConditions>
<imsss:rollupCondition condition="satisfied"/>
</imsss:rollupConditions>
<imsss:rollupAction action="satisfied"/>
</imsss:rollupRule>
<imsss:rollupRule childActivitySet="all">
<imsss:rollupConditions conditionCombination="any">
<imsss:rollupCondition operator="not" condition="satisfied" />
</imsss:rollupConditions>
<imsss:rollupAction action="notSatisfied" />
</imsss:rollupRule>
</imsss:rollupRules>
<imsss:rollupRules rollupObjectiveSatisfied="true" rollupProgressCompletion="true" />
</imsss:sequencing>
</organization>
</organizations>
I was deep in this a few years back but I'll try to assist based on some of my prior examples.
I think you need to set a primary objective. Else - I don't believe there is anything to roll up to. I don't however know that for a fact, as it would require going back and doing a deeper dive in to the SCORM 2004 3rd/4th edition spec and covering the IMSS Sequencing section.
Small example for an activity:
<!-- Activity 1 -->
<title>ims_sequencing_objectives</title>
<item identifier="ACT-001" identifierref="RES-001">
<title>SCOBot-QUnit1</title>
<imsss:sequencing IDRef="COMMON_SEQ_RULES">
<imsss:sequencingRules>
<!-- If you also wanted to limit the number of attempts -->
<imsss:preConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition condition="attemptLimitExceeded" />
</imsss:ruleConditions>
<!-- Can not choose -->
<imsss:ruleAction action="disabled" />
</imsss:preConditionRule>
</imsss:sequencingRules>
<imsss:limitConditions attemptLimit="1" /> <!-- attemptAbsoluteDurationLimit="" set if max_time_allowed -->
<imsss:rollupRules objectiveMeasureWeight="0" />
<imsss:objectives>
<!-- My Understanding is SCO1_SATISFIED will assume the scoring of the SCO, then you can continue to SCO 2 after the preCondition is met. This SCO is just a "intro" no score reported. Removed satisfiedByMeasure -->
<imsss:primaryObjective objectiveID="SCO1_SATISFIED">
<imsss:mapInfo targetObjectiveID="com.cybercussion.SCOBot.ACT-001" readSatisfiedStatus="true" writeSatisfiedStatus="true" readNormalizedMeasure="true" writeNormalizedMeasure="true" />
</imsss:primaryObjective>
</imsss:objectives>
</imsss:sequencing>
Then a subsequent activity would allow the LMS Player the opportunity to decide whether it should allow the navigation/show it using pre/post rules. And I would agree this gets confusing. Further more its even harder to unit test unless you have some rules engine that can parse this realtime to validate your intent. This below sample would be like Activity/SCO 3...
<imsss:preConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition referencedObjective="SCO2_SATISFIED" condition="satisfied" />
</imsss:ruleConditions>
<imsss:ruleAction action="disabled" />
</imsss:preConditionRule>
You can also control how the content controls the LMS. As some parts of SCORM like completion and success status could be based on progress_measure and scoring if completion thresholds are set (for example).
<!-- Sequence Collection used by SCOs -->
<imsss:sequencingCollection>
<imsss:sequencing ID="COMMON_SEQ_RULES">
<!-- Rollup: set to 0 if you don't want these scored. -->
<!--imsss:rollupRules objectiveMeasureWeight="1" /-->
<!-- prevent from accidentally being quto-completed/satisfied -->
<imsss:deliveryControls completionSetByContent="true" objectiveSetByContent="true" />
<!-- Attempt limit here had no effect -->
</imsss:sequencing>
</imsss:sequencingCollection>
I have a one page progression example here: https://github.com/cybercussion/SCOBot/wiki/Single-Pages-Managed-by-LMS-Navigation There may be something to glean off it. I always thought this was an area/gap the community would eventually fill with some builder/tool but since we are talking about 14 years almost now! I started to attempt to address some of this with my Packager app but there simply isn't enough customer request/demand to spend the time on it.
Good Luck.

ServiceControl Beta 7.15 RavenDB Error - Failed to execute indexing function on MessagesViewIndex

Helpful information to include
Product name:
Version:
Stacktrace:
Description:
I just upgraded ServiceControl from Beta6 to Beta7.15 and I am getting the following error (see at the bottom of the is post) when I start the service and it just seems to hang there. Note that I deleted the previous database via the following script as outlined in the directions.
net stop "Particular ServiceControl"
RD C:\programdata\particular\ServiceControl\localhost-33333 /S
net start "Particular ServiceControl"
I also configured the ServiceControl config file using the following settings. I used the ServiceControl/Hostname and ServiceControl/ExposeRavenDB setting with Beta 6 with success. I just added ExpirationProcessTimerInSeconds and HoursToKeepMessagesBeforeExpiring using the instructions provided.
<add key="ServiceControl/Hostname" value="*" />
<add key="ServiceControl/ExposeRavenDB" value="true" />
<add key="ExpirationProcessTimerInSeconds" value="600" />
<add key="HoursToKeepMessagesBeforeExpiring" value="168" />
Any assistance you can provide would be greatly appreciated.
2014-03-28 15:49:13.5041|Warn|Raven.Database.Indexing.Index.Indexing|Failed to execute indexing function on MessagesViewIndex on FailedMessages/f027b8ef-2be5-7403-820f-4c358ddecba9
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Operator '!=' cannot be applied to operands of type 'string' and 'int'
at CallSite.Target(Closure , CallSite , Object , Int32 )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Index_MessagesViewIndex.<.ctor>b__5e(Object message)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Raven.Database.Indexing.RobustEnumerator.MoveNext(IEnumerator en, StatefulEnumerableWrapper`1 innerEnumerator) in c:\Builds\RavenDB-Unstable-v2.5-New\Raven.Database\Indexing\RobustEnumerator.cs:line 91

list=alllinks confusion

I'm doing a research project for the summer and I've got to use get some data from Wikipedia, store it and then do some analysis on it. I'm using the Wikipedia API to gather the data and I've got that down pretty well.
What my questions is in regards to the links-alllinks option in the API doc here
After reading the description, both there and in the API itself (it's down and bit and I can't link directly to the section), I think I understand what it's supposed to return. However when I ran a query it gave me back something I didn't expect.
Here's the query I ran:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=google&rvprop=ids|timestamp|user|comment|content&rvlimit=1&list=alllinks&alunique&allimit=40&format=xml
Which in essence says: Get the last revision of the Google page, include the id, timestamp, user, comment and content of each revision, and return it in XML format.
The allinks (I thought) should give me back a list of wikipedia pages which point to the google page (In this case the first 40 unique ones).
I'm not sure what the policy is on swears, but this is the result I got back exactly:
<?xml version="1.0"?>
<api>
<query><normalized>
<n from="google" to="Google" />
</normalized>
<pages>
<page pageid="1092923" ns="0" title="Google">
<revisions>
<rev revid="366826294" parentid="366673948" user="Citation bot" timestamp="2010-06-08T17:18:31Z" comment="Citations: [161]Tweaked: url. [[User:Mono|Mono]]" xml:space="preserve">
<!-- The page content, I've replaced this cos its not of interest -->
</rev>
</revisions>
</page>
</pages>
<alllinks>
<!-- offensive content removed -->
</alllinks>
</query>
<query-continue>
<revisions rvstartid="366673948" />
<alllinks alfrom="!2009" />
</query-continue>
</api>
The <alllinks> part, its just a load of random gobbledy-gook and offensive comments. No nearly what I thought I'd get. I've done a fair bit of searching but I can't seem to find a direct answer to my question.
What should the list=alllinks option return?
Why am I getting this crap in there?
You don't want a list; a list is something that iterates over all pages. In your case you simply "enumerate all links that point to a given namespace".
You want a property associated with the Google page, so you need prop=links instead of the alllinks crap.
So your query becomes:
http://en.wikipedia.org/w/api.php?action=query&prop=revisions|links&titles=google&rvprop=ids|timestamp|user|comment|content&rvlimit=1&format=xml