Stream ID count limitations or restrictions

Debugging an application that utilizes multiple pthreads all executing the same algorithm. Each pthread has multiple Stream Ids. One pthread instance runs fine. When attempting run with 2 pthreads active, kernel aborts with errno 11 which indicates an invalid parameter. All the other parameters appear OK since they are all valid host or gpu memory allocations identical to the single thread that runs fine. Is there a maximum number of active stream Ids allowed? Are there any restrictions regarding memory allocation (host and gpu) and which stream Ids can utilize or access them? If the application aborts, are the stream Ids and cuda context for those threads automatically cleaned up/