MariaDB Galera SST Fails

I am running a 3 node MariaDB 10 Galera Cluster on CentOS 6. I have use this set-up before without issue else where but now when adding a 3rd node the SST fails with this error in the logs:

150212 18:03:02 [Warning] WSREP: 1.0 (server1.example.com): State transfer to 0.0 (server3.example.com) failed: -22 (Invalid argument)
150212 18:03:02 [ERROR] WSREP: gcs/src/gcs_group.c:gcs_group_handle_join_msg():723: Will never receive state. Need to abort.

Checking the logs of the donor node shows:

150212 18:03:01 [ERROR] WSREP: Failed to read from: wsrep_sst_xtrabackup-v2 --role 'donor' --address '192.168.0.3:4444/xtrabackup_sst' --auth 'wsrep_sst:wsrep_pass' --socket '/var/lib/mysql/mysql.sock' --datadir '/var/lib/mysql/' --defaults-file '/etc/my.cnf'  --binlog 'mysql-bin' --gtid '8561e69a-9beb-11e4-825a-f2380deeda3b:18365'
150212 18:03:01 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role 'donor' --address '192.168.0.3:4444/xtrabackup_sst' --auth 'wsrep_sst:wsrep_pass' --socket '/var/lib/mysql/mysql.sock' --datadir '/var/lib/mysql/' --defaults-file '/etc/my.cnf'  --binlog 'mysql-bin' --gtid '8561e69a-9beb-11e4-825a-f2380deeda3b:18365': 22 (Invalid argument)
150212 18:03:01 [ERROR] WSREP: Command did not run: wsrep_sst_xtrabackup-v2 --role 'donor' --address '192.168.0.3:4444/xtrabackup_sst' --auth 'wsrep_sst:wsrep_pass' --socket '/var/lib/mysql/mysql.sock' --datadir '/var/lib/mysql/' --defaults-file '/etc/my.cnf'  --binlog 'mysql-bin' --gtid '8561e69a-9beb-11e4-825a-f2380deeda3b:18365'

My config looks like so:

[server]
wsrep_provider="/usr/lib64/galera/libgalera_smm.so"
wsrep_cluster_address="gcomm://192.168.0.1,192.168.0.2,192.168.0.3"
wsrep_cluster_name='MY_CLUSTER'
wsrep_sst_auth=wsrep_sst:wsrep_pass
wsrep_sst_method=xtrabackup-v2
wsrep_sst_receive_address=192.168.0.3
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
innodb_file_per_table=1
query_cache_size=0
binlog_format=ROW
log-bin=mysql-bin

[mysqld]
datadir=/var/lib/mysql
tmpdir=/tmp
user=mysql
bind-address=0.0.0.0

Nodes only differ in their wsrep_sst_receive_address value.

Switching to Webview context fails

I was trying to automate tests for a hybrid app, while switching, it only shows name native context. WebView Context is shown as webview_undefined.

Set  contextNames = driver.getContextHandles();
for (String contextName : contextNames) 
{
     System.out.println(contextName);
     if (contextName .contains("WEBVIEW"))
     {
         driver.context(contextName); 
        webViewFound = true; 
        System.out.println("switched to webview");
    }
}

I’m using the above code. Can anyone give solution for this !

Twofish fails Dieharder test

I’ve tested Twofish (256 bit) as follows. A lengthy pseudorandom sequence was generated and used as a key. Plaintext phrases 000000000..00, 00000..01, 0000...FFFFF, were generated and encoded using Twofish with the key. Ciphertexts were split in 32 bit numbers (40 million numbers total).

In theory, the cipher should pass the Dieharder tests. In practice, it appears to fail a number of them.

Pseudorandom number generator passed all tests, so this isn’t a bug with Dieharder.

Does this mean that Twofish is not as secure as claimed?


Edited:

TwoFish.java comes from http://www.sethi.org/tmp/ssh/src/com/mindbright/security/cipher/Twofish.java

FishRunner.java is my wrapper that generates “sequential plain text blocks as ASCII characters”. Each block is ciphered using Twofish with byte[] defaultKey = {-24,29,83,38,-77,-92,-46,25,-117,-71,42,-44,-52,97,58,-114,50,-27,49,47,12,52,-76,-88,-26,17,18,84,30,-95,80,13,32};. From each plaintext block I get 256 bits of ciphered text. These 256 bits are split in chunks of 32 bit each and saved to “/tmp/FromFish/fish.txt” with an appropriate header.

first several lines of fish.txt

#==================================================================
# generator mt19937  seed = 316179543
#==================================================================
type: d
count: 40000000
numbit: 32
4205098517
1950644630
 217236044
4021751533
1670623305
4216006007
1982760947
2956150679
2523872870
1802016715
 546984380
3195151793
 478820823
3432394711

Once all 40000000 records were created (440Mb of data) Dieharder was launched with dieharder -a -g 202 -f fish.txt >>res.txt

            dieharder version 3.31.1 Copyright 2003 Robert G. Brown          #
##  
   rng_name    |           filename             |rands/second|
     file_input|                        fish.txt|  7.26e+06  |
#   
        test_name   |ntup| tsamples |psamples|  p-value |Assessment
# b       #
   diehard_birthdays|   0|       100|     100|0.65344498|  PASSED     
      diehard_operm5|   0|   1000000|     100|0.11726095|  PASSED     
  diehard_rank_32x32|   0|     40000|     100|0.84203088|  PASSED     
    diehard_rank_6x8|   0|    100000|     100|0.73796762|  PASSED     
   diehard_bitstream|   0|   2097152|     100|0.38051493|  PASSED      
        diehard_opso|   0|   2097152|     100|0.04995365|  PASSED      
        diehard_oqso|   0|   2097152|     100|0.59990831|  PASSED      
         diehard_dna|   0|   2097152|     100|0.62220146|  PASSED      
diehard_count_1s_str|   0|    256000|     100|0.86262588|  PASSED       
diehard_count_1s_byt|   0|    256000|     100|0.12560712|  PASSED       
 diehard_parking_lot|   0|     12000|     100|0.28041223|  PASSED       
    diehard_2dsphere|   2|      8000|     100|0.76183470|  PASSED       
    diehard_3dsphere|   3|      4000|     100|0.17846568|  PASSED       
     diehard_squeeze|   0|    100000|     100|0.00384865|   WEAK        
        diehard_sums|   0|       100|     100|0.43470008|  PASSED       
        diehard_runs|   0|    100000|     100|0.70560801|  PASSED         
        diehard_runs|   0|    100000|     100|0.98961342|  PASSED       
       diehard_craps|   0|    200000|     100|0.18043071|  PASSED        
       diehard_craps|   0|    200000|     100|0.89290364|  PASSED       
 marsaglia_tsang_gcd|   0|  10000000|     100|0.00000000|  FAILED        
 marsaglia_tsang_gcd|   0|  10000000|     100|0.00000000|  FAILED       
         sts_monobit|   1|    100000|     100|0.72613955|  PASSED        
            sts_runs|   2|    100000|     100|0.26712378|  PASSED        
          sts_serial|   1|    100000|     100|0.94935591|  PASSED        
          sts_serial|   2|    100000|     100|0.93198856|  PASSED       
          sts_serial|   3|    100000|     100|0.99554380|   WEAK          
          sts_serial|   3|    100000|     100|0.72444970|  PASSED         
          sts_serial|   4|    100000|     100|0.19981717|  PASSED          
          sts_serial|   4|    100000|     100|0.06124493|  PASSED        
          sts_serial|   5|    100000|     100|0.87811046|  PASSED       
          sts_serial|   5|    100000|     100|0.09618787|  PASSED        
          sts_serial|   6|    100000|     100|0.87317579|  PASSED       
          sts_serial|   6|    100000|     100|0.99688012|   WEAK         
          sts_serial|   7|    100000|     100|0.50043383|  PASSED        
          sts_serial|   7|    100000|     100|0.61746527|  PASSED       
          sts_serial|   8|    100000|     100|0.97376805|  PASSED        
          sts_serial|   8|    100000|     100|0.94872352|  PASSED        
          sts_serial|   9|    100000|     100|0.35958803|  PASSED        
          sts_serial|   9|    100000|     100|0.39252366|  PASSED        
          sts_serial|  10|    100000|     100|0.40682407|  PASSED       
          sts_serial|  10|    100000|     100|0.69846273|  PASSED      
          sts_serial|  11|    100000|     100|0.14757958|  PASSED      
          sts_serial|  11|    100000|     100|0.85142983|  PASSED     
          sts_serial|  12|    100000|     100|0.33628714|  PASSED   
          sts_serial|  12|    100000|     100|0.80400201|  PASSED       
          sts_serial|  13|    100000|     100|0.50635238|  PASSED     
          sts_serial|  13|    100000|     100|0.04113439|  PASSED         
          sts_serial|  14|    100000|     100|0.48030593|  PASSED    
          sts_serial|  14|    100000|     100|0.83615004|  PASSED   
          sts_serial|  15|    100000|     100|0.85634237|  PASSED    
          sts_serial|  15|    100000|     100|0.86413582|  PASSED     
          sts_serial|  16|    100000|     100|0.81247787|  PASSED    
          sts_serial|  16|    100000|     100|0.62279344|  PASSED   
         rgb_bitdist|   1|    100000|     100|0.10521730|  PASSED    
         rgb_bitdist|   2|    100000|     100|0.36419006|  PASSED   
         rgb_bitdist|   3|    100000|     100|0.50848488|  PASSED   
         rgb_bitdist|   4|    100000|     100|0.91911028|  PASSED   
         rgb_bitdist|   5|    100000|     100|0.68355135|  PASSED   
         rgb_bitdist|   6|    100000|     100|0.07298074|  PASSED   
         rgb_bitdist|   7|    100000|     100|0.99703911|   WEAK    
         rgb_bitdist|   8|    100000|     100|0.50843903|  PASSED   
         rgb_bitdist|   9|    100000|     100|0.51151893|  PASSED   
         rgb_bitdist|  10|    100000|     100|0.40558627|  PASSED   
         rgb_bitdist|  11|    100000|     100|0.27640943|  PASSED   
         rgb_bitdist|  12|    100000|     100|0.64415540|  PASSED   
rgb_minimum_distance|   2|     10000|    1000|0.77930849|  PASSED   
rgb_minimum_distance|   3|     10000|    1000|0.89974521|  PASSED   
rgb_minimum_distance|   4|     10000|    1000|0.52655953|  PASSED   
rgb_minimum_distance|   5|     10000|    1000|0.01029230|  PASSED   
    rgb_permutations|   2|    100000|     100|0.49947588|  PASSED    
    rgb_permutations|   3|    100000|     100|0.48976917|  PASSED   
    rgb_permutations|   4|    100000|     100|0.99435735|  PASSED   
    rgb_permutations|   5|    100000|     100|0.18313717|  PASSED   
      rgb_lagged_sum|   0|   1000000|     100|0.11846988|  PASSED   
      rgb_lagged_sum|   1|   1000000|     100|0.20793259|  PASSED   
      rgb_lagged_sum|   2|   1000000|     100|0.08406645|  PASSED   
      rgb_lagged_sum|   3|   1000000|     100|0.00002903|   WEAK    
      rgb_lagged_sum|   4|   1000000|     100|0.00000000|  FAILED   
      rgb_lagged_sum|   5|   1000000|     100|0.00156593|   WEAK    
      rgb_lagged_sum|   6|   1000000|     100|0.13398055|  PASSED   
      rgb_lagged_sum|   7|   1000000|     100|0.00000071|  FAILED  
      rgb_lagged_sum|   8|   1000000|     100|0.07282751|  PASSED   
      rgb_lagged_sum|   9|   1000000|     100|0.00000653|   WEAK    
      rgb_lagged_sum|  10|   1000000|     100|0.24179580|  PASSED   
      rgb_lagged_sum|  11|   1000000|     100|0.00620851|  PASSED   
      rgb_lagged_sum|  12|   1000000|     100|0.24310357|  PASSED   
      rgb_lagged_sum|  13|   1000000|     100|0.15323532|  PASSED   
      rgb_lagged_sum|  14|   1000000|     100|0.00000174|   WEAK    
      rgb_lagged_sum|  15|   1000000|     100|0.00000000|  FAILED   
      rgb_lagged_sum|  16|   1000000|     100|0.39385345|  PASSED   
      rgb_lagged_sum|  17|   1000000|     100|0.11381934|  PASSED   
      rgb_lagged_sum|  18|   1000000|     100|0.78715021|  PASSED   
      rgb_lagged_sum|  19|   1000000|     100|0.00000000|  FAILED   
      rgb_lagged_sum|  20|   1000000|     100|0.52371093|  PASSED   
      rgb_lagged_sum|  21|   1000000|     100|0.00531931|  PASSED   
      rgb_lagged_sum|  22|   1000000|     100|0.19857791|  PASSED   
      rgb_lagged_sum|  23|   1000000|     100|0.00000000|  FAILED   
      rgb_lagged_sum|  24|   1000000|     100|0.00000431|   WEAK    
      rgb_lagged_sum|  25|   1000000|     100|0.02471464|  PASSED   
      rgb_lagged_sum|  26|   1000000|     100|0.07546643|  PASSED   
      rgb_lagged_sum|  27|   1000000|     100|0.01786362|  PASSED   
      rgb_lagged_sum|  28|   1000000|     100|0.28778610|  PASSED   
      rgb_lagged_sum|  23|   1000000|     100|0.00000000|  FAILED 
      rgb_lagged_sum|  30|   1000000|     100|0.13632978|  PASSED   
      rgb_lagged_sum|  31|   1000000|     100|0.00000000|  FAILED   
      rgb_lagged_sum|  32|   1000000|     100|0.11176539|  PASSED   
     rgb_kstest_test|   0|     10000|    1000|0.29113864|  PASSED   
     dab_bytedistrib|   0|  51200000|       1|0.00000000|  FAILED   
             dab_dct| 256|     50000|       1|0.93719430|  PASSED   
Preparing to run test 207.  ntuple = 0 
        dab_filltree|  32|  15000000|        1|0.60930301|  PASSED  
        dab_filltree|  32|  15000000|       1|0.29252232|  PASSED     
Preparing to run test 208.  ntuple = 0   
       dab_filltree2|   0|   5000000|       1|0.64246455|  PASSED     
       dab_filltree2|   1|   5000000|       1|0.20829118|  PASSED     
Preparing to run test 209.  ntuple = 0
        dab_monobit2|  12|  65000000|       1|1.00000000|  FAILED     

Here’s a summary of the tests that failed:

       test_name   |ntup| tsamples |psamples|  p-value |Assessment
marsaglia_tsang_gcd|   0|  10000000|     100|0.00000000|  FAILED         
marsaglia_tsang_gcd|   0|  10000000|     100|0.00000000|  FAILED
     rgb_lagged_sum|   7|   1000000|     100|0.00000071|  FAILED
     rgb_lagged_sum|  15|   1000000|     100|0.00000000|  FAILED
     rgb_lagged_sum|  19|   1000000|     100|0.00000000|  FAILED
     rgb_lagged_sum|  23|   1000000|     100|0.00000000|  FAILED
     rgb_lagged_sum|  31|   1000000|     100|0.00000000|  FAILED 
    dab_bytedistrib|   0|  51200000|       1|0.00000000|  FAILED
       dab_monobit2|  12|  65000000|       1|1.00000000|  FAILED

Twofish algo is saved here: https://pastebin.com/THGegxKY

Class below is my wrapper to generate ciphers from consequential plain text messages

package models;


import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Random;

public class FishRunner {

    private  String filePath = "~/Dev/CleanFish/res/";
    private  String valuesFolder = "values/in_";    
    private  String keysFolder = "keys/k_";
    private  String resultsFolder = "results/dh_";



    private int keySize = 32;
    private byte[] defaultKey = {-24,29,83,38,-77,-92,-46,25,-117,-71,42,-44,-52,97,58,-114,50,-27,49,47,12,52,-76,-88,-26,17,18,84,30,-95,80,13};


    public static void main(String[] args) {

        System.out.println("l: " + fS(toUnsignedLong(-1)) +", 2xMaxInt "+ (2* ((long) Integer.MAX_VALUE))  +"nnn");  
        FishRunner fr = new FishRunner();       
    }

    private FishRunner() {

        int[] numberOfReps = {6180339, 9227465, 10000000, 14930352};  
        char[] codesN = {'a', 'b', 'c','d'};

        byte[] defPlainTextByteValue = {0,1,2,8,15}; 
        char[] codesP = {'0','1','2','8','F'};

        byte[] defaultOffsetStartingPosition = {0,3,7,12}; 
        String[] codesOff = {"00","03","07","12"};



        for(int i=0; i< numberOfReps.length; i++) {

            for(int j=0; j< defPlainTextByteValue.length; j++) {

                for(int k=0; k< defaultOffsetStartingPosition.length; k++) {

                    String fName = codesN[i]+ "_"+codesP[j]+ "_"+codesOff[k]+".txt";

                    try {
                        testAlgo(fName, numberOfReps[i], 0, defPlainTextByteValue[j], defaultOffsetStartingPosition[k]) ;
                        System.out.println("Done: "+fName);                 
                    } catch (Exception e) { e.printStackTrace();    }

                }                   
            }
        }
        System.out.println("Done.");
    }
    private void testAlgo(String filename, int numOfRepetitions, int initPlainTextValue, byte backgroundValue, byte defaultOffsetStartingPosition) throws  Exception {

        writeDHCommand(filename);   
        byte[] keyChars = defaultKey;

        Object key = TwoFish.makeKey(keyChars);     
        int lineCount = numOfRepetitions*4;

        writeKeyToFile(filename,keyChars);  




        PrintWriter writer = new PrintWriter(filePath + valuesFolder + filename, "UTF-8");
        writer.println("#==================================================================");
        writer.println("# generator mt19937  seed = 316179543");
        writer.println("#==================================================================");
        writer.println("type: d");
        writer.println("count: "+lineCount+"");
        writer.println("numbit: 32");

        for(int i = 0; i < numOfRepetitions; i++) {         
            int intOffset = i + initPlainTextValue; 
            byte[] text = generateText(intOffset,backgroundValue,defaultOffsetStartingPosition);

                byte[] ct = TwoFish.blockEncrypt(text, 0, key);
                for (int x = 0; x < ct.length ; x=x+4) {
                    writer.println(fS(Long.toString(toUnsignedLong(toInt(ct, x))),10));                 
                }
        }
        writer.close(); 
    }


    private byte[] generateText(int stepNumber, byte defValue, byte defaultOffsetStartingPosition) {

        byte[] text = new byte[32];
        Arrays.fill(text, defValue);        

        text[(defaultOffsetStartingPosition)% 32] = (byte) (stepNumber );
        text[(defaultOffsetStartingPosition+1)% 32] = (byte) (stepNumber >>> 8);
        text[(defaultOffsetStartingPosition+2)% 32] = (byte) (stepNumber >>> 16);
        text[(defaultOffsetStartingPosition+3)% 32] = (byte) (stepNumber >>> 24);   
        return text;            
        }


    private byte[] initKey() {

        Random r = new Random(0);
        byte[] key = new byte[keySize];

        for (int i = 0; i <  keySize; i++) {            
            key[i] = (byte)(-128+r.nextInt(256)) ;  
        }
        System.out.println("Key: "+Arrays.toString(key));

    return key;

    }   

    public static int toInt(byte[] bytes, int offset) {
        int ret = 0;
        for (int i=0; i<4 && i+offset>> 4) & 0x0F];
            buf[j++] = HEX_DIGITS[ k      & 0x0F];
            }
        return new String(buf);
        } 

    private void writeDHCommand(String fileName) throws Exception { 

        String formattedFileName =  valuesFolder + fileName;
        String dhFileName = resultsFolder + fileName;

        PrintWriter writerDHCommand = new PrintWriter(new FileOutputStream(new File(filePath+"dh_commands.txt"), true));        
        String dhCmdLine = "dieharder -a -g 202 -f "+ formattedFileName+ " >>"+ dhFileName;
        writerDHCommand.println(dhCmdLine);
        writerDHCommand.close();        
    }

    private void writeKeyToFile(String filename, byte[] keyChars) throws Exception {    
        PrintWriter keyWritter = new PrintWriter(filePath + keysFolder + filename, "UTF-8");        
        keyWritter.println(Arrays.toString(keyChars));
        keyWritter.close();
    }




       //        INNER METHODS


    private static final int longSpaces = 35;
    private static final int intSpaces = 15;



        public static String fS(long text) {    
            return fS(Long.toString(text), longSpaces);
        }

        public static String fS(int text) { 
            return fS(Integer.toString(text), intSpaces);
        }

        public static String fS(String text, int charTotal) {       
            return String.format("%1$" + charTotal + "s",text + "" );
        }


           private static String toString (byte[] ba) {
                  return toString(ba, 0, ba.length);
               }
}

Edited:

Rewinds are not spotted by in 10M x 32bit datasets from Pi Hex and SecureRandom in at least some data sets.
Increasing the size of PT for TwoFish allows it to pass DH tests. Possible explainations:

  • False negative. The larger the number of sequencial contributes to

Randomness of plaintext blocks increases with their number.

As the number of PT blocks increases

  • False positive. Looping over a small data set results in FAILED tests(Unlikely, since Hex Pi passes tests at the same size)
  • False negative. Large number of PT blocks increases the entropy of PT itself, allowing the cipher to PASS tests

Passing extensive randomness testing suggests (but doesn’t guarantee) that the cipher might be strong.
Failing randomness tests indicate a problem with one of the following:

  • Weak key (ruled out by testing a set of keys, generated using SecureRandom)
  • Wrong conversion from CT to DH input format (if so – what went wrong?)
  • Wrong implementation of the cipher (Does Google return buggy TF.java ?)
  • Wrong cipher design (unlikely: algo validation improved since 1960s RANDU)

tex4ht fails with scrartcl class when defining rm command. Argument of popthree has an extra

This MWE compiles OK with lualatex and pdflatex but fails with tex4ht. Why? And this happens only when using scrartcl and not with article.

documentclass[11pt]{scrartcl}%{article}
DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm}

begin{document}
test
end{document}

Now

 make4ht -ulm draft foo.tex
 ....
(/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/html5.4ht))
(/usr/local/texlive/2018/texmf-dist/tex/generic/tex4ht/scrartcl.4ht
! Argument of popthree has an extra }.

par
l.33 :temp{rm}
?

I also tried

 documentclass[11pt,enabledeprecatedfontcommands]{scrartcl}

But make4ht still gave same error.

Is there a workaround other than using article? I need to use DeclareOldFontCommand{rm}{normalfontrmfamily}{mathrm} for other things.

Using TL 2018

Travis CI fails to create a scratch org

Yesterday, my Travis CI builds started to fail on a scratch org creation step:

$ sfdx force:auth:jwt:grant --clientid $CONSUMERKEY --jwtkeyfile server.key --username $USERNAME --setdefaultdevhubusername -a HubOrg
Successfully authorized [secure] with org ID 00D6A000001jFciUAE

$ sfdx force:org:create -v HubOrg -s -f config/project-scratch-def.json -a ciorg
ERROR: Socket timeout occurred while listening for results.

At the same time I can successfully create the scratch org from my local machine using the same commands. Was there any kind of security update of Salesforce platform? Is it possible to debug this kind of issue?

UPD: it seems that the scratch org is actually created (at least it appears inside DebHub’s ‘Scratch Org Infos’ tab) but still unavailable to the sfdx commands. If I add --json option, I can see more details though it doesn’t become any clearer

{"message":"Socket timeout occurred while listening for results.","status":1,"stack":"genericTimeoutMessage: Socket timeout occurred while listening for results.n at ALMError (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/almError.js:35:19)n at OrgCreateCommand._streamingCallback (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/scratchOrgCreateCommand.js:155:31)n at asyncStatusClient.subscribe (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/scratchOrgCreateCommand.js:203:81)n at Timeout.timeout.setTimeout (/home/travis/.local/share/sfdx/client/node_modules/salesforce-alm/dist/lib/status.js:126:17)n at ontimeout (timers.js:475:11)n at tryOnTimeout (timers.js:310:5)n at Timer.listOnTimeout (timers.js:270:5)","name":"genericTimeoutMessage","warnings":[],"action":"Use command "sfdx force:data:soql:query -q "SELECT Status FROM ScratchOrgInfo WHERE Id='2SR6A000000GnLQWA0'"" to retry. You may consider increasing --wait parameter value to increase timeout."}

Executing sfdx force:org:list --all after creation attempt shows only DevHub

BoxCollider2D fails verification, where CircleCollider2D does not

I have a 2D game object with no parent and a 2D box collider set with trigger enables. The dimensions are quite large.

When I place the game object in the scene, manually, it works just fine. However, when I instantiate the prefab, it doesn’t work; in the inspector view, under the collider component a notification appears:

The collider did not create any collision shapes as they all failed verification. This could be because they were deemed too small or the vertices were too close. Vertices can also become close under rotations or very small scaling.

The game object in the inspector.

When I switch to scene view, while the game is in play mode, I can not see the collider boundaries. Surprisingly, everything works fine, if I use the circle collider. Does anyone know what the problem could be?

Truffle fails to migrate an Oraclize contract into Ganache

I have a contract that is using Oraclize.

When deploying the contract from the Remix IDE into Ganache/Ethereum-bridge via MetaMask, the contract is fully functional. However, when trying to migrate the contract from Truffle into Ganache/Ethereum-bridge, I am getting the following error:

Running migration: 2_deploy_contracts.js
  Deploying ContractOne...
  ... (TX_ADDRESS)
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.

Note, TX_ADDRESS is the transaction address I masked here.

My 2_deploy_contracts.js file:

var ContractOne = artifacts.require("./ContractOne.sol");
module.exports = function(deployer) {
  deployer.deploy(ContractOne, "FROM ADDRESS");
};

truffle.js file:

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*", // Match any network id,
      gas: 4700000,
      gasPrice: 40
    }
  }
};

Tried changing the gas amount, adding the gas amount into the deployer – nothing works. At this moment, I suspect the issue is in Oraclize contract using abstract functions, though I’m not sure. What could be the source of this error?

Truffle fails to migrate an Oraclize contract to Ganache

I have a contract that is using Oraclize.

When deploying the contract from the Remix IDE into Ganache/Ethereum-bridge via MetaMask, the contract is fully functional. However, when trying to migrate the contract from Truffle into Ganache/Ethereum-bridge, I am getting the following error:

Running migration: 2_deploy_contracts.js
  Deploying PowerEther...
  ... (TX_ADDRESS)
Error encountered, bailing. Network state unknown. Review successful transactions manually.
Error: The contract code couldn't be stored, please check your gas amount.

Note, TX_ADDRESS is the transaction address I masked here.

My 2_deploy_contracts.js file:

var ContractOne = artifacts.require("./ContractOne.sol");
module.exports = function(deployer) {
  deployer.deploy(ContractOne, "FROM ADDRESS");
};

Tried changing the gas amount, adding the gas amount into the deployer – nothing works. At this moment, I suspect the issue is in Oraclize contract using abstract functions, though I’m not sure. What could be the source of this error?

What is the probability that a student selected randomly is a female student who fails the exam

Student records show that historically 70% of female students are likely to pass the exam, while only 50% of male students are likely to pass. Forty percent of the students are male.

P(m)=0.4 and P(f)=0.6 P(pass|m)=0.5 and P(pass|f)=0.7

a) What is the probability that a student selected randomly fails the exam?

My answer: p(pass) = 0.4*0.5 + 0.6*0.7 = 0.62, so p(‘pass) = 1 – 0.62 = 0.38

b) What is the probability that a student selected randomly is a female student who fails the exam?

My answer: p(f|pass) = (0.6*0.7)/0.62 = 0.68, so p(f|’pass) = 1 – 0.68 = 0.32

I would just like to confirm my answers.